fix: the secrets

This commit is contained in:
kenji
2025-12-27 19:29:51 -06:00
parent 32cf771c69
commit 08b78610f3
3 changed files with 17 additions and 4 deletions
+1 -1
View File
@@ -13,10 +13,10 @@
../modules/home/theme.nix ../modules/home/theme.nix
../modules/home/gaming.nix ../modules/home/gaming.nix
inputs.walker.homeManagerModules.default inputs.walker.homeManagerModules.default
inputs.sops-nix.homeManagerModules.sops
]; ];
home.sessionVariables = { home.sessionVariables = {
AVANTE_GEMINI_API_KEY = config.sops.secrets.AVANTE_GEMINI_API_KEY.path;
}; };
home.stateVersion = "25.05"; home.stateVersion = "25.05";
+14 -2
View File
@@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
myConfig, myConfig,
config,
... ...
}: { }: {
security.pam.services.greetd.enableGnomeKeyring = true; security.pam.services.greetd.enableGnomeKeyring = true;
@@ -12,8 +13,19 @@
sops = { sops = {
defaultSopsFile = ../secrets/secrets.yaml; defaultSopsFile = ../secrets/secrets.yaml;
age.keyFile = "/home/${myConfig.nixos.username}/.config/sops/age/keys.txt"; age.keyFile = "/home/${myConfig.nixos.username}/.config/sops/age/keys.txt";
secrets.default_password = { secrets = {
neededForUsers = true; default_password = {
neededForUsers = true;
};
AVANTE_GEMINI_API_KEY = {
owner = "kenji";
};
}; };
}; };
programs.fish.interactiveShellInit = ''
if test -f ${config.sops.secrets.AVANTE_GEMINI_API_KEY.path}
set -gx AVANTE_GEMINI_API_KEY (cat ${config.sops.secrets.AVANTE_GEMINI_API_KEY.path})
end
'';
} }
+2 -1
View File
@@ -1,6 +1,7 @@
{ {config, ...}: {
environment.sessionVariables = { environment.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
AVANTE_GEMINI_API_KEY = config.sops.secrets.AVANTE_GEMINI_API_KEY.path;
}; };
} }