Skip to content

Commit

Permalink
feat(sops): make atuin use key from sops
Browse files Browse the repository at this point in the history
  • Loading branch information
sbulav committed Nov 2, 2024
1 parent 9b0d937 commit 92b9c79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions nix/modules/darwin/system/security/sops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
}: let
inherit (lib.${namespace}) mkBoolOpt mkOpt;

cfg = config.${namespace}.system.security.sops;
cfg = config.${namespace}.security.sops;
in {
options.${namespace}.system.security.sops = with lib.types; {
options.${namespace}.security.sops = with lib.types; {
enable = mkBoolOpt false "Whether to enable sops.";
defaultSopsFile = mkOpt path null "Default sops file.";
sshKeyPaths = mkOpt (listOf path) ["/etc/ssh/ssh_host_ed25519_key"] "SSH Key paths to use.";
Expand Down
5 changes: 3 additions & 2 deletions nix/modules/home/cli-apps/atuin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ in {
invert = false;
#TODO:(atuin) disable when comfortable
show_help = true;
sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
sops.secrets = lib.mkIf config.${namespace}.security.sops.enable {
key_path = config.sops.secrets.atuin_key.path;
};

Expand All @@ -43,7 +43,8 @@ in {
};
};

sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
# sops.secrets = lib.mkIf osConfig.${namespace}.security.sops.enable {
sops.secrets = lib.mkIf config.${namespace}.security.sops.enable {
atuin_key = {
sopsFile = lib.snowfall.fs.get-file "secrets/sab/default.yaml";
};
Expand Down
2 changes: 1 addition & 1 deletion nix/systems/aarch64-darwin/mbp16/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ with lib.custom; {
virt-manager = disabled;
};

system.security = {
security = {
sops = {
enable = false; #TODO: enable when fix is available https://github.com/Mic92/sops-nix/pull/614
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
Expand Down

0 comments on commit 92b9c79

Please sign in to comment.