feat(secrets): Add darwin sops config and gemini key access
This commit is contained in:
parent
f502810dae
commit
79b83cfc70
1 changed files with 15 additions and 0 deletions
|
@ -30,6 +30,21 @@ in
|
|||
'';
|
||||
};
|
||||
};
|
||||
flake.modules.darwin.default =
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ inputs.sops-nix.darwinModules.sops ];
|
||||
config = {
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "${config.users.users.${username}.home}/.ssh/id_ed25519" ];
|
||||
secrets."keys/gemini".sopsFile = secrets + "/keys.yaml";
|
||||
};
|
||||
environment.shellInit = # sh
|
||||
''
|
||||
export GEMINI_API_KEY=$(sudo cat ${config.sops.secrets."keys/gemini".path})
|
||||
'';
|
||||
};
|
||||
};
|
||||
flake.modules.homeManager.default.persistDirs = [ ".config/sops/age" ];
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue