I’m trying to install NixOS on Dell Poweredge R730 using nixos-anywhere. But I get this error:
f user@kaktus 30s 1 nixos-configuration main m -> sudo nix run github:nix-community/nixos-anywhere -- --flake ./#server-0 --target-host root@10.1.0.12
Warning: Identity file /tmp/tmp.20EWJUIAdA/nixos-anywhere not accessible: No such file or directory.
### Uploading install SSH keys ###
/run/current-system/sw/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/tmp/tmp.20EWJUIAdA/nixos-anywhere.pub"
/run/current-system/sw/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/run/current-system/sw/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added '10.1.0.12' (ED25519) to the list of known hosts.
(root@10.1.0.12) Password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh -i /tmp/tmp.20EWJUIAdA/nixos-anywhere -o 'IdentitiesOnly=no' -o 'ConnectTimeout=10' -o 'IdentitiesOnly=yes' -o 'UserKnownHostsFile=/dev/null' -o 'StrictHostKeyChecking=no' 'root@10.1.0.12'"
and check to make sure that only the key(s) you wanted were added.
### Gathering machine facts ###
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '10.1.0.12' (ED25519) to the list of known hosts.
Warning: Permanently added '10.1.0.12' (ED25519) to the list of known hosts.
error:
… while calling the 'head' builtin
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/lib/attrsets.nix:1719:13:
1718| if length values == 1 || pred here (elemAt values 1) (head values) then
1719| head values
| ^
1720| else
… while evaluating the attribute 'value'
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/lib/modules.nix:1149:7:
1148| // {
1149| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1150| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/wlk9a5827bc2pdqisypjkgcv5j72xia8-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/wlk9a5827bc2pdqisypjkgcv5j72xia8-source/nixos/modules/hardware/device-tree.nix':
… while evaluating the option `hardware.deviceTree.enable':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'buildDTBs' missing
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/nixos/modules/hardware/device-tree.nix:126:19:
125| enable = lib.mkOption {
126| default = config.boot.kernelPackages.kernel.buildDTBs;
| ^
127| defaultText = lib.literalExpression "config.boot.kernelPackages.kernel.buildDTBs";
f user@kaktus 25s 1 nixos-configuration main ->
I booted up nixos-minimal iso on the server. I downloaded it some time ago, so maybe this iso is too old?
Okay, I tried fresh iso (today downloaded) and the same error occurs:
f user@kaktus 0s nixos-configuration main -> sudo nix run github:nix-community/nixos-anywhere -- --flake ./#server-0 --target-host root@10.1.0.11
[sudo] password for kazimierzkrauze:
Warning: Identity file /tmp/tmp.42UmNz1w0V/nixos-anywhere not accessible: No such file or directory.
### Uploading install SSH keys ###
/run/current-system/sw/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/tmp/tmp.42UmNz1w0V/nixos-anywhere.pub"
/run/current-system/sw/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/run/current-system/sw/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added '10.1.0.11' (ED25519) to the list of known hosts.
(root@10.1.0.11) Password:
Connection closed by 10.1.0.11 port 22
/run/current-system/sw/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/tmp/tmp.42UmNz1w0V/nixos-anywhere.pub"
/run/current-system/sw/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/run/current-system/sw/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Warning: Permanently added '10.1.0.11' (ED25519) to the list of known hosts.
(root@10.1.0.11) Password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh -i /tmp/tmp.42UmNz1w0V/nixos-anywhere -o 'IdentitiesOnly=no' -o 'ConnectTimeout=10' -o 'IdentitiesOnly=yes' -o 'UserKnownHostsFile=/dev/null' -o 'StrictHostKeyChecking=no' 'root@10.1.0.11'"
and check to make sure that only the key(s) you wanted were added.
### Gathering machine facts ###
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Permanently added '10.1.0.11' (ED25519) to the list of known hosts.
Warning: Permanently added '10.1.0.11' (ED25519) to the list of known hosts.
error:
… while calling the 'head' builtin
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/lib/attrsets.nix:1719:13:
1718| if length values == 1 || pred here (elemAt values 1) (head values) then
1719| head values
| ^
1720| else
… while evaluating the attribute 'value'
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/lib/modules.nix:1149:7:
1148| // {
1149| value = addErrorContext "while evaluating the option `${showOption loc}':" value;
| ^
1150| inherit (res.defsFinal') highestPrio;
… while evaluating the option `system.build.toplevel':
… while evaluating definitions from `/nix/store/wlk9a5827bc2pdqisypjkgcv5j72xia8-source/nixos/modules/system/activation/top-level.nix':
… while evaluating the option `assertions':
… while evaluating definitions from `/nix/store/wlk9a5827bc2pdqisypjkgcv5j72xia8-source/nixos/modules/hardware/device-tree.nix':
… while evaluating the option `hardware.deviceTree.enable':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: attribute 'buildDTBs' missing
at «github:nixos/nixpkgs/65179426c83bb3f6bc14898b42ea1c6f01d374b0?narHash=sha256-xnJJk%2Bct%2BD2%2BwdRxj1wk36w5zV9RVESwRqcklPdt3fM%3D»/nixos/modules/hardware/device-tree.nix:126:19:
125| enable = lib.mkOption {
126| default = config.boot.kernelPackages.kernel.buildDTBs;
| ^
127| defaultText = lib.literalExpression "config.boot.kernelPackages.kernel.buildDTBs";
f user@kaktus 6m53s 1 nixos-configuration main ->
Sure, I should mention that I didn’t include my confile because it is in multiple files and I don’t know which part is important. boot.kernelPackages is set to pkgs-stable.linuxPackages.
What you’ve done is try to use kernelPackages from nixos-26.05 with nixos-unstable. This fails because of commit 31d1d80b3fb5ca92da5836376cae81fa523da428 introducing buildDTBs to nixos-unstable.