import DO token into environment while assuming shell

This commit is contained in:
TheWanderingCrow 2025-02-07 20:39:05 -05:00
parent 0fa437530e
commit b11cedf26b
2 changed files with 9 additions and 0 deletions

View file

@ -37,4 +37,12 @@ lib.mkIf config.user.crow.enable {
mkdir -p /home/crow/.aws mkdir -p /home/crow/.aws
ln -s ${config.sops.templates."aws_shared_config".path} /home/crow/.aws/credentials ln -s ${config.sops.templates."aws_shared_config".path} /home/crow/.aws/credentials
''; '';
################
# DigitalOcean #
################
sops.secrets."digitalocean/token" = {
owner = config.users.users.crow.name;
};
} }

View file

@ -1,6 +1,7 @@
{pkgs ? import <nixpkgs> {}, ...}: { {pkgs ? import <nixpkgs> {}, ...}: {
default = pkgs.mkShell { default = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes"; NIX_CONFIG = "extra-experimental-features = nix-command flakes";
DIGITALOCEAN_TOKEN = builtins.readFile /run/secrets/digitalocean/token;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
git git
vim vim