Hello all. I have been following this for guidance on my system configuration format.
Here is the error I get when trying to sudo nixos-rebuild build --flake .# --show-trace
:
[nix-shell:/etc/nixos]# sudo nixos-rebuild build --flake . --show-trace
building the system configuration...
error:
… while calling the 'seq' builtin
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while evaluating a branch condition
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:261:9:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… in the right operand of the AND (&&) operator
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:261:72:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… while evaluating the attribute 'unmatchedDefns'
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:688:7:
687| # Transforms unmatchedDefnsByName into a list of definitions
688| unmatchedDefns =
| ^
689| if configs == []
… while calling the 'concatLists' builtin
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:11:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:10:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… from call site
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:16:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:46:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:681:22:
680| # Propagate all unmatched definitions from nested option sets
681| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
682| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:10:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… from call site
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:16:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:46:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:681:22:
680| # Propagate all unmatched definitions from nested option sets
681| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
682| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:10:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… from call site
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:16:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:46:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:681:22:
680| # Propagate all unmatched definitions from nested option sets
681| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
682| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:10:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… from call site
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:649:16:
648| attrs:
649| map (name: f name attrs.${name}) (attrNames attrs);
| ^
650|
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:46:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:681:22:
680| # Propagate all unmatched definitions from nested option sets
681| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
682| # Plus the definitions for the current prefix that don't have a matching option
… from call site
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:695:24:
694| else
695| concatLists (mapAttrsToList (name: defs:
| ^
696| map (def: def // {
… while calling 'mapAttrsToList'
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/attrsets.nix:648:5:
647| # Attribute set to map over.
648| attrs:
| ^
649| map (name: f name attrs.${name}) (attrNames attrs);
… while calling anonymous lambda
at /nix/store/k5l01g2zwhysjyl5zjvg5zxnj0lyxpp1-source/lib/modules.nix:569:14:
568| lib.all
569| (c:
| ^
570| # TODO: I have my doubts that this error would occur when option definitions are not matched.
error: value is a Boolean while a set was expected
I’ve double checked my paths, not sure what the issue is, especially as the error does not point to any one of my files. I’m using unstable nixpkgs, but it also does not build with stable nixpkgs as well.
Pretty sure I am having a fundamental misunderstanding of some kind and would appreciate some guidance.
Edit: backed up my /etc/nixos then went back to a simpler layout.
/etc/nixos:
├── configuration.nix
├── flake.lock
├── flake.nix
├── hardware-configuration.nix
├── home.nix
└── result -> /nix/store/06piahm8nilz043db44id4ykb37i2sgw-nixos-system-eye-24.05.20240309.3030f18