--- a/modules/nixos/secrets.nix +++ b/modules/nixos/secrets.nix @@ -11,7 +11,7 @@ inherit (lib.lists) optional; inherit (lib.attrsets) mapAttrs; inherit (lib.modules) mkIf; - inherit (lib.types) submodule str attrsOf nullOr unspecified lazyAttrsOf; + inherit (lib.types) submodule str attrsOf nullOr unspecified lazyAttrsOf uniq functionTo package; inherit (fleetLib.strings) decodeRawSecret; sysConfig = config; @@ -60,7 +60,7 @@ }; generator = mkOption { - type = nullOr unspecified; + type = uniq (nullOr (functionTo package)); description = "Derivation to evaluate for secret generation"; default = null; }; --- a/modules/secrets.nix +++ b/modules/secrets.nix @@ -4,7 +4,7 @@ ... }: let inherit (lib.options) mkOption literalExpression; - inherit (lib.types) unspecified nullOr listOf str bool attrsOf submodule functionTo package unique; + inherit (lib.types) unspecified nullOr listOf str bool attrsOf submodule functionTo package uniq; inherit (lib.strings) concatStringsSep; inherit (lib.attrsets) mapAttrs; @@ -41,7 +41,7 @@ ''; }; generator = mkOption { - type = nullOr (unique (functionTo package)); + type = uniq (nullOr (functionTo package)); description = '' Function evaluating to nix derivation responsible for (re)generating the secret's content.