git.delta.rocks / jrsonnet / refs/commits / 16240ebb9bc9

difftreelog

fixup nixos generator type

Lach2025-03-23parent: #098319f.patch.diff
in: trunk

2 files changed

modifiedmodules/nixos/secrets.nixdiffbeforeafterboth
--- 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;
       };
modifiedmodules/secrets.nixdiffbeforeafterboth
4 ...4 ...
5}: let5}: let
6 inherit (lib.options) mkOption literalExpression;6 inherit (lib.options) mkOption literalExpression;
7 inherit (lib.types) unspecified nullOr listOf str bool attrsOf submodule functionTo package unique;7 inherit (lib.types) unspecified nullOr listOf str bool attrsOf submodule functionTo package uniq;
8 inherit (lib.strings) concatStringsSep;8 inherit (lib.strings) concatStringsSep;
9 inherit (lib.attrsets) mapAttrs;9 inherit (lib.attrsets) mapAttrs;
1010
41 '';41 '';
42 };42 };
43 generator = mkOption {43 generator = mkOption {
44 type = nullOr (unique (functionTo package));44 type = uniq (nullOr (functionTo package));
45 description = ''45 description = ''
46 Function evaluating to nix derivation responsible for (re)generating the secret's content.46 Function evaluating to nix derivation responsible for (re)generating the secret's content.
4747