Skip to content

Commit

Permalink
feat(sops): make secrets optional in homes
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Nov 8, 2024
1 parent bda4b05 commit b9d71b5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 6 additions & 0 deletions nix/homes/aarch64-darwin/sab@mbp16/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ with lib.custom; {
};
};

sops.secrets = {
env_credentials = {
sopsFile = lib.snowfall.fs.get-file "secrets/sab/default.yaml";
path = "${config.home.homeDirectory}/.ssh/sops-env-credentials";
};
};
home.sessionPath = [
"$HOME/bin"
];
Expand Down
7 changes: 7 additions & 0 deletions nix/homes/x86_64-linux/sab@nz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,12 @@ in {
};
};
};

sops.secrets = {
env_credentials = {
sopsFile = lib.snowfall.fs.get-file "secrets/sab/default.yaml";
path = "${config.home.homeDirectory}/.ssh/sops-env-credentials";
};
};
home.stateVersion = "23.11";
}
7 changes: 0 additions & 7 deletions nix/modules/home/security/sops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ in {
sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"] ++ cfg.sshKeyPaths;
};

# Example secrets
secrets = {
env_credentials = {
sopsFile = lib.snowfall.fs.get-file "secrets/sab/default.yaml";
path = "${config.home.homeDirectory}/.ssh/sops-env-credentials";
};
};
# exa_mbp16 = {
# sopsFile = lib.snowfall.fs.get-file "secrets/mbp16@sab/default.yaml";
# path = "${config.home.homeDirectory}/exa-test.yaml";
Expand Down
6 changes: 0 additions & 6 deletions nix/modules/nixos/system/security/sops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,5 @@ in {
keyFile = "${config.users.users.${config.${namespace}.user.name}.home}/.config/sops/age/keys.txt";
};
};

sops.secrets = {
"nz_sab_ssh_key" = {
sopsFile = lib.snowfall.fs.get-file "secrets/sab/default.yaml";
};
};
};
}

0 comments on commit b9d71b5

Please sign in to comment.