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
Describe the bug
Running with 24.11 and adding the simple flake.nix as /etc/nixos/flake.nix running:
sudo nixos-rebuild switch
I get:
error: flake 'path:/etc/nixos' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."nixos".config.system.build.nixos-rebuild', 'legacyPackages.x86_64-linux.nixosConfigurations."nixos".config.system.build.nixos-rebuild' or 'nixosConfigurations."nixos".config.system.build.nixos-rebuild'
Removing the flake, system build completes normally
To Reproduce
See above
Expected behavior
System should build with no changes
Screenshots
Not applicable.
Environment (please complete the following information):
The error indicates that your hostname is currently set to nixos. However, it appears that nixosConfigurations."nixos" is not defined in your `flake.nix.
To resolve this, you can attempt to replace my-nixos with nixos in the flake.nix file and then nixos-rebuild again.
I had the same issue on NixOS. After following the command the host name was still the old name. After a reboot the host name was changed and then it worked. Maybe a new shell would have been sufficient too.
Describe the bug
Running with 24.11 and adding the simple flake.nix as /etc/nixos/flake.nix running:
sudo nixos-rebuild switch
I get:
error: flake 'path:/etc/nixos' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."nixos".config.system.build.nixos-rebuild', 'legacyPackages.x86_64-linux.nixosConfigurations."nixos".config.system.build.nixos-rebuild' or 'nixosConfigurations."nixos".config.system.build.nixos-rebuild'
Removing the flake, system build completes normally
To Reproduce
See above
Expected behavior
System should build with no changes
Screenshots
Not applicable.
Environment (please complete the following information):
Additional context
NixOS is running on WSL-2:
wsl --version
WSL version: 2.4.4.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22635.4515
The text was updated successfully, but these errors were encountered: