From 910cd3316bfaf10f720c16264df366cb554a77f9 Mon Sep 17 00:00:00 2001 From: Adrian G L Date: Sat, 16 Nov 2024 15:06:45 +0100 Subject: [PATCH] fix: sops global to relative path --- profiles/sops.nix | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/profiles/sops.nix b/profiles/sops.nix index 1948413..551eac8 100644 --- a/profiles/sops.nix +++ b/profiles/sops.nix @@ -10,21 +10,22 @@ # This will add secrets.yml to the nix store # You can avoid this by adding a string to the full path instead, i.e. # sops.defaultSopsFile = "/root/.sops/secrets/example.yaml"; - sops.defaultSopsFile = "/etc/nixos/nix-dotfiles/secrets/secrets.yaml"; - sops.validateSopsFiles = false; - # This will automaticx-sopsally import SSH keys as age keys - sops.age.sshKeyPaths = [ + # sops.defaultSopsFile = "/etc/nixos/nix-dotfiles/secrets/secrets.yaml"; + sops = { + defaultSopsFile = ../secrets/secrets.yaml; + validateSopsFiles = false; + + # This will automaticx-sopsally import SSH keys as age keys + age.sshKeyPaths = [ "/etc/ssh/nixos" "/root/.ssh/nixos" - #"/$HOME/.ssh/nixos" - #"/home/gunalx/.ssh/nixos" ]; - # This is using an age key that is expected to already be in the filesystem - sops.age.keyFile = "/var/lib/sops-nix/key.txt"; - # This will generate a new key if the key specified above does not exist - sops.age.generateKey = true; - - # This is the actual specification of the secrets. - #sops.secrets."myservice/my_subdir/my_secret" = {}; - + # This is using an age key that is expected to already be in the filesystem + #age.keyFile = "/var/lib/sops-nix/key.txt"; + age.keyFile = "/root/.config/sops/age/key.txt"; + # This will generate a new key if the key specified above does not exist + age.generateKey = true; + # This is the actual specification of the secrets. + #secrets."myservice/my_subdir/my_secret" = {}; + }; }