1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-31 04:14:37 +00:00

module: Don't set option-value as option-default

When using `documentation.nixos.includeAllModules = true;`, I'd
otherwise have to rebuild the manual on each change since I have my
`defaultSopsFile` in a git-repo with all my other configs.
This commit is contained in:
Maximilian Bosch 2021-03-28 22:58:13 +02:00
parent 137d387e78
commit 94fd200305
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E

View file

@ -6,6 +6,9 @@ let
cfg = config.sops;
users = config.users.users;
secretType = types.submodule ({ config, ... }: {
config = {
sopsFile = lib.mkOptionDefault cfg.defaultSopsFile;
};
options = {
name = mkOption {
type = types.str;
@ -62,7 +65,7 @@ let
};
sopsFile = mkOption {
type = types.path;
default = cfg.defaultSopsFile;
defaultText = "\${config.sops.defaultSopsFile}";
description = ''
Sops file the secret is loaded from.
'';