1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-05 16:17:47 +00:00
316: HM: make `secretsMountPoint` and `symlinkPath` configurable r=Mic92 a=Shawn8901



Co-authored-by: MidAutumnMoon <me@418.im>
This commit is contained in:
bors[bot] 2023-04-18 12:41:35 +00:00 committed by GitHub
commit 5698b06b07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ let
path = lib.mkOption { path = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "%r/secrets/${name}"; default = "${cfg.defaultSymlinkPath}/${name}";
description = '' description = ''
Path where secrets are symlinked to. Path where secrets are symlinked to.
If the default is kept no other symlink is created. If the default is kept no other symlink is created.
@ -66,8 +66,8 @@ let
name = "manifest${suffix}.json"; name = "manifest${suffix}.json";
text = builtins.toJSON { text = builtins.toJSON {
secrets = builtins.attrValues secrets; secrets = builtins.attrValues secrets;
secretsMountPoint = "%r/secrets.d"; secretsMountPoint = cfg.defaultSecretsMountPoint;
symlinkPath = "%r/secrets"; symlinkPath = cfg.defaultSymlinkPath;
keepGenerations = cfg.keepGenerations; keepGenerations = cfg.keepGenerations;
gnupgHome = cfg.gnupg.home; gnupgHome = cfg.gnupg.home;
sshKeyPaths = cfg.gnupg.sshKeyPaths; 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 { keepGenerations = lib.mkOption {
type = lib.types.ints.unsigned; type = lib.types.ints.unsigned;
default = 1; default = 1;