diff --git a/home/hakase.nix b/home/hakase.nix index 01ec2da..ff707f7 100644 --- a/home/hakase.nix +++ b/home/hakase.nix @@ -13,10 +13,10 @@ ../modules/home/theme.nix ../modules/home/gaming.nix inputs.walker.homeManagerModules.default + inputs.sops-nix.homeManagerModules.sops ]; home.sessionVariables = { - AVANTE_GEMINI_API_KEY = config.sops.secrets.AVANTE_GEMINI_API_KEY.path; }; home.stateVersion = "25.05"; diff --git a/system/security.nix b/system/security.nix index ad307b1..ee5d16f 100644 --- a/system/security.nix +++ b/system/security.nix @@ -1,6 +1,7 @@ { pkgs, myConfig, + config, ... }: { security.pam.services.greetd.enableGnomeKeyring = true; @@ -12,8 +13,19 @@ sops = { defaultSopsFile = ../secrets/secrets.yaml; age.keyFile = "/home/${myConfig.nixos.username}/.config/sops/age/keys.txt"; - secrets.default_password = { - neededForUsers = true; + secrets = { + 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 + ''; } diff --git a/system/variables.nix b/system/variables.nix index 100f75f..2046cb6 100644 --- a/system/variables.nix +++ b/system/variables.nix @@ -1,6 +1,7 @@ -{ +{config, ...}: { environment.sessionVariables = { EDITOR = "nvim"; VISUAL = "nvim"; + AVANTE_GEMINI_API_KEY = config.sops.secrets.AVANTE_GEMINI_API_KEY.path; }; }