diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index addfce4..ef73737 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -25,7 +25,7 @@ let path = lib.mkOption { type = lib.types.str; - default = "%r/secrets/${name}"; + default = "${cfg.defaultSymlinkPath}/${name}"; description = '' Path where secrets are symlinked to. If the default is kept no other symlink is created. @@ -66,8 +66,8 @@ let name = "manifest${suffix}.json"; text = builtins.toJSON { secrets = builtins.attrValues secrets; - secretsMountPoint = "%r/secrets.d"; - symlinkPath = "%r/secrets"; + secretsMountPoint = cfg.defaultSecretsMountPoint; + symlinkPath = cfg.defaultSymlinkPath; keepGenerations = cfg.keepGenerations; gnupgHome = cfg.gnupg.home; sshKeyPaths = cfg.gnupg.sshKeyPaths; @@ -133,6 +133,23 @@ in { ''; }; + defaultSymlinkPath = lib.mkOption { + type = lib.types.str; + default = "%r/secrets"; + description = '' + Default place where the latest generation of decrypt secrets + can be found. + ''; + }; + + defaultSecretsMountPoint = lib.mkOption { + type = lib.types.str; + default = "%r/secrets.d"; + description = '' + Default place where generations of decrypted secrets are stored. + ''; + }; + keepGenerations = lib.mkOption { type = lib.types.ints.unsigned; default = 1;