I keep getting the following error when trying to run nixos-rebuild build and variations (switch, boot, etc.).
building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/g9863dnbpnfa7vz8c1s1idwbg7c5j0bb-source/lib/attrsets.nix:1571:13:
1570| if length values == 1 || pred here (elemAt values 1) (head values) then
1571| head values
| ^
1572| else
… while evaluating the attribute 'value'
at /nix/store/g9863dnbpnfa7vz8c1s1idwbg7c5j0bb-source/lib/modules.nix:1083:7:
1082| // {
1083| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1084| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/g9863dnbpnfa7vz8c1s1idwbg7c5j0bb-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/a4la088hi5id7sw77gy9zdvwn83dgczz-source/nixos/common.nix':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `home-manager.users.<username>."volume master"' does not exist. Definition values:
- In `/nix/store/g9863dnbpnfa7vz8c1s1idwbg7c5j0bb-source/flake.nix':
{
position = 1;
settings = {
device = "pulse:1";
format = "♪ %volume";
...
<username> is just my name (purely alphabetic characters), which is redacted here.
I was trying to setup i3status in home-manager when I ran sudo nixos-rebuild switch with an option that didn’t exist. The culpable snippet in question is located in /etc/nixos/home.nix (which exists alongside /etc/nixos/flake.nix and /etc/nixos/configuration.nix, I have things like this for the time being, I plan to modularize, move, and generally improve my configuration later) and is:
i3status = {
enable = true;
"volume master" = {
position = 1;
settings = {
format = "♪ %volume";
format_muted = "♪ muted (%volume)";
};
};
};
I believe trying to rebuild this resulted in the same error, but I could be wrong. Of course after this I corrected the snippet:
i3status = {
enable = true;
modules = {
"volume master" = {
position = 1;
settings = {
format = "♪ %volume";
format_muted = "♪ muted (%volume)";
};
};
};
};
But I continued to get the same error, even when commenting out this snippet. It appears to be the fault of something in the nix store? But I’m not sure how to amend that. If necessary I can provide my flake.nix, home.nix, and configuration.nix. Thanks in advance.