From 94fd200305ceb031380381ae91a1ffabe9f06706 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 28 Mar 2021 22:58:13 +0200 Subject: [PATCH] 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. --- modules/sops/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/sops/default.nix b/modules/sops/default.nix index e0d0e07..6afc522 100644 --- a/modules/sops/default.nix +++ b/modules/sops/default.nix @@ -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. '';