You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into the issue that my existing system config did not build with the secrix module imported. I could deduce this back to having documentation.nixos = { enable = true; includeAllModules = true; }; set. I assume includeAllModules is the main problem. With the best of my knowledge, I assume there breaks something while building the documentation of this module.
I deduced the bug down to following minimal system config, which reproduces the error (imagine as part of a flake.nix with inputs nixpkgs & secrix):
Then running nixos-rebuild --flake .#test --show-trace build returns following trace:
Stacktrace of nixos-rebuild
building the system configuration...
trace: evaluation warning: Attempt to evaluate package pkgs.age in option documentation; this is not supported and will eventually be an error. Use `mkPackageOption{,MD}` or `literalExpression` instead.
error:
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1571:24:
1570| let f = attrPath:
1571| zipAttrsWith (n: values:
| ^
1572| let here = attrPath ++ [n]; in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `system.build.toplevel':
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/top-level.nix':
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/top-level.nix:71:12:
70| # Replace runtime dependencies
71| system = foldr ({ oldDependency, newDependency }: drv:
| ^
72| pkgs.replaceDependency { inherit oldDependency newDependency drv; }
… while calling 'foldr'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:121:20:
120| */
121| foldr = op: nul: list:
| ^
122| let
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:128:8:
127| else op (elemAt list n) (fold' (n + 1));
128| in fold' 0;
| ^
129|
… while calling 'fold''
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:124:15:
123| len = length list;
124| fold' = n:
| ^
125| if n == len
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/top-level.nix:68:10:
67| then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
68| else showWarnings config.warnings baseSystem;
| ^
69|
… while calling 'showWarnings'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/trivial.nix:929:28:
928|
929| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
930|
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/trivial.nix:929:33:
928|
929| showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
| ^
930|
… while calling 'foldr'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:121:20:
120| */
121| foldr = op: nul: list:
| ^
122| let
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:128:8:
127| else op (elemAt list n) (fold' (n + 1));
128| in fold' 0;
| ^
129|
… while calling 'fold''
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/lists.nix:124:15:
123| len = length list;
124| fold' = n:
| ^
125| if n == len
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/top-level.nix:48:16:
47| # makes it bootable. See `activatable-system.nix`.
48| baseSystem = pkgs.stdenvNoCC.mkDerivation ({
| ^
49| name = "nixos-system-${config.system.name}-${config.system.nixos.label}";
… while calling 'mkDerivation'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:46:5:
45| mkDerivation =
46| fnOrAttrs:
| ^
47| if builtins.isFunction fnOrAttrs
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `system.systemBuilderArgs':
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:858:59:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:582:20:
581| check = isAttrs;
582| merge = loc: defs:
| ^
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:583:35:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling 'filterAttrs'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:646:5:
645| pred:
646| set:
| ^
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:647:29:
646| set:
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
648|
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:647:62:
646| set:
647| listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
| ^
648|
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:583:51:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:583:86:
582| merge = loc: defs:
583| mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
| ^
584| (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/activatable-system.nix':
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/activation-script.nix:135:18:
134| apply = set: set // {
135| script = systemActivationScript set false;
| ^
136| };
… while calling 'systemActivationScript'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/activation-script.nix:20:33:
19|
20| systemActivationScript = set: onlyDry: let
| ^
21| set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/activation/activation-script.nix:51:9:
50|
51| ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
| ^
52|
… while calling 'textClosureMap'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/strings-with-deps.nix:75:35:
74|
75| textClosureMap = f: predefined: names:
| ^
76| concatStringsSep "\n" (map f (textClosureList predefined names));
… while calling 'id'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/trivial.nix:39:8:
38| */
39| id = x: x;
| ^
40|
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `system.activationScripts.etc.text':
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/etc/etc-activation.nix':
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1571:24:
1570| let f = attrPath:
1571| zipAttrsWith (n: values:
| ^
1572| let here = attrPath ++ [n]; in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:607:29:
606| merge = loc: defs:
607| zipAttrsWith (name: defs:
| ^
608| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:836:28:
835| # Process mkMerge and mkIf properties.
836| defs' = concatMap (m:
| ^
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/etc/etc.nix':
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:837:128:
836| defs' = concatMap (m:
837| map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
838| ) defs;
… while calling 'dischargeProperties'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:908:25:
907| */
908| dischargeProperties = def:
| ^
909| if def._type or "" == "merge" then
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:273:39:
272| then value
273| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
274| in atDepth 0;
… while calling 'atDepth'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:270:17:
269| len = length attrPath;
270| atDepth = n:
| ^
271| if n == len
… while evaluating derivation 'etc'
whose name attribute is located at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'buildCommand' of derivation 'etc'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/build-support/trivial-builders/default.nix:68:16:
67| enableParallelBuilding = true;
68| inherit buildCommand name;
| ^
69| passAsFile = [ "buildCommand" ]
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/etc/etc.nix:54:7:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/strings.nix:232:5:
231| f:
232| list: concatStringsSep sep (map f list);
| ^
233|
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/etc/etc.nix:54:33:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/modules/system/etc/etc.nix:54:43:
53| mkdir -p "$out/etc"
54| ${concatMapStringsSep "\n" (etcEntry: escapeShellArgs [
| ^
55| "makeEtcEntry"
… while calling 'concatMapStringsSep'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/strings.nix:232:5:
231| f:
232| list: concatStringsSep sep (map f list);
| ^
233|
… while calling 'escapeShellArg'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/strings.nix:1054:20:
1053| */
1054| escapeShellArg = arg: "'${replaceStrings ["'"] ["'\\''"] (toString arg)}'";
| ^
1055|
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1205:18:
1204| mapAttrs
1205| (name: value:
| ^
1206| if isAttrs value && cond value
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:1208:18:
1207| then recurse (path ++ [ name ]) value
1208| else f (path ++ [ name ]) value);
| ^
1209| in
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:254:72:
253| # For definitions that have an associated option
254| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
255|
… while evaluating the option `environment.etc.dbus-1.source':
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:858:17:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:858:22:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:534:15:
533| descriptionClass = "noun";
534| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
535| merge = mergeEqualOption;
… while evaluating derivation 'dbus-1'
whose name attribute is located at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'serviceDirectories' of derivation 'dbus-1'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/development/libraries/dbus/make-dbus-conf.nix:17:12:
16| {
17| inherit serviceDirectories suidHelper apparmor;
| ^
18| preferLocalBuild = true;
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:552:14:
551| merge = loc: defs:
552| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
553| imap1 (m: def':
… while calling anonymous lambda
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:858:17:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/modules.nix:858:22:
857| if isDefined then
858| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
859| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'check'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/types.nix:534:15:
533| descriptionClass = "noun";
534| check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
| ^
535| merge = mergeEqualOption;
… while evaluating derivation 'system-path'
whose name attribute is located at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'passAsFile' of derivation 'system-path'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/build-support/trivial-builders/default.nix:69:9:
68| inherit buildCommand name;
69| passAsFile = [ "buildCommand" ]
| ^
70| ++ (derivationArgs.passAsFile or [ ]);
… while evaluating derivation 'nixos-configuration-reference-manpage'
whose name attribute is located at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'buildCommand' of derivation 'nixos-configuration-reference-manpage'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/build-support/trivial-builders/default.nix:68:16:
67| enableParallelBuilding = true;
68| inherit buildCommand name;
| ^
69| passAsFile = [ "buildCommand" ]
… while evaluating derivation 'options.json'
whose name attribute is located at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/pkgs/stdenv/generic/make-derivation.nix:336:7
… while evaluating attribute 'options' of derivation 'options.json'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/nixos/lib/make-options-doc/default.nix:198:7:
197| ];
198| options = builtins.toFile "options.json"
| ^
199| (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix));
… while evaluating the default value of option `secrix.services.<name>.secrets.<name>.decrypted.user`
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/options.nix:346:15:
345| builtins.addErrorContext "while evaluating the ${if opt?defaultText then "defaultText" else "default value"} of option `${name}`" (
346| renderOptionValue (opt.defaultText or opt.default)
| ^
347| );
… while calling 'renderOptionValue'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/options.nix:383:23:
382| */
383| renderOptionValue = v:
| ^
384| if v ? _type && v ? text then v
… from call site
at /nix/store/n0xvqhfzy169h8gflnhlr9m77z4l087x-source/module.nix:263:36:
262| default = let
263| servUser = hasAttrByPath [ "serviceConfig" "User" ] sysConfig.systemd.services.${outer.config.systemdService};
| ^
264| servDynUser = attrByPath [ "serviceConfig" "DynamicUser" ] false sysConfig.systemd.services.${outer.config.systemdService};
… while calling 'hasAttrByPath'
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:135:5:
134| attrPath:
135| e:
| ^
136| let
… from call site
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:148:7:
147| in
148| hasAttrByPath' 0 e;
| ^
149|
… while calling 'hasAttrByPath''
at /nix/store/sfycwi72zfjsspidinx56ajaiffpyh17-source/lib/attrsets.nix:138:27:
137| lenAttrPath = length attrPath;
138| hasAttrByPath' = n: s: (
| ^
139| n == lenAttrPath || (
error: attribute 'systemd' missing
at /nix/store/n0xvqhfzy169h8gflnhlr9m77z4l087x-source/module.nix:263:77:
262| default = let
263| servUser = hasAttrByPath [ "serviceConfig" "User" ] sysConfig.systemd.services.${outer.config.systemdService};
| ^
264| servDynUser = attrByPath [ "serviceConfig" "DynamicUser" ] false sysConfig.systemd.services.${outer.config.systemdService};
Did you mean system?
EDIT: For full reproducibility, I quickly added & uploaded test configs to my system configs flake (with an updated lock file). I tested this with nixpkgs on release-24.05 & unstable. But you can also run:
flake_url='git+https://git.banananet.work/banananetwork/server?ref=secrix-issue25&rev=fff0c9a8a7456e67201f3a110a3d74c531cb2468'
nixos-rebuild --show-trace build --flake "$flake_url"#secrix_issue25 # stable, not working
nixos-rebuild --show-trace build --flake "$flake_url"#secrix_issue25_working # with .includeAllModules disabled, working
nixos-rebuild --show-trace build --flake "$flake_url"#secrix_issue25_unstable # unstable, not working
The text was updated successfully, but these errors were encountered:
I assume I have found the reason & a solution for it. Nix failed while evaluating the default of an option. However, in any case where the default is not dynamically chosen, the NixOS manual states that its better to set defaultText so that the user can anticipate how the default is affected by other options. I started to add defaultText attributes to all options with dynamic defaults & I will create a PR with that solution later on.
I ran into the issue that my existing system config did not build with the secrix module imported. I could deduce this back to having
documentation.nixos = { enable = true; includeAllModules = true; };
set. I assumeincludeAllModules
is the main problem. With the best of my knowledge, I assume there breaks something while building the documentation of this module.I deduced the bug down to following minimal system config, which reproduces the error (imagine as part of a
flake.nix
with inputsnixpkgs
&secrix
):Then running
nixos-rebuild --flake .#test --show-trace build
returns following trace:Stacktrace of nixos-rebuild
EDIT: For full reproducibility, I quickly added & uploaded test configs to my system configs flake (with an updated lock file). I tested this with nixpkgs on
release-24.05
&unstable
. But you can also run:The text was updated successfully, but these errors were encountered: