feat(keys): get gemini key from exret
This commit is contained in:
parent
5e01993093
commit
cc08a506c8
1 changed files with 13 additions and 3 deletions
|
@ -10,15 +10,25 @@ let
|
||||||
inherit (lib.meta) getExe;
|
inherit (lib.meta) getExe;
|
||||||
inherit (lib.strings) trim;
|
inherit (lib.strings) trim;
|
||||||
inherit (cfg.admin) username pubkey;
|
inherit (cfg.admin) username pubkey;
|
||||||
|
inherit (cfg.paths) secrets;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.default =
|
flake.modules.nixos.default =
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||||
config.sops.age.sshKeyPaths = [
|
config = {
|
||||||
"/persist${config.users.defaultUserHome}/${username}/.ssh/id_ed25519"
|
sops = {
|
||||||
];
|
age.sshKeyPaths = [
|
||||||
|
"/persist${config.users.defaultUserHome}/${username}/.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" ];
|
flake.modules.homeManager.default.persistDirs = [ ".config/sops/age" ];
|
||||||
perSystem =
|
perSystem =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue