Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: flake does not provide attribute #45

Open
iocron opened this issue Aug 27, 2023 · 4 comments
Open

error: flake does not provide attribute #45

iocron opened this issue Aug 27, 2023 · 4 comments

Comments

@iocron
Copy link

iocron commented Aug 27, 2023

I've followed the readme instructions (I am using the nix-starter-config#standard version and I have a fresh nixos installation) and used sudo nixos-rebuild switch --flake .#nixos then I am getting the following error:

error: flake 'git+file:///home/mp/nix-config' 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'
@Vaisakhkm2625
Copy link

same here

[vaisakh@nixos:~/nix-config]$ sudo nixos-rebuild switch --flake .#hostname
warning: Git tree '/home/vaisakh/nix-config' is dirty
error: flake 'git+file:///home/vaisakh/nix-config' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."hostname".config.system.build.nixos-rebuild', 'legacyPackages.x86_64-linux.nixosConfigurations."hostname".config.system.build.nixos-rebuild' or 'nixosConfigurations."hostname".config.system.build.nixos-rebuild'

@Vaisakhkm2625
Copy link

Vaisakhkm2625 commented Sep 5, 2023

sorry got it... in command

sudo nixos-rebuild switch --flake .#hostname

hostname should be replaced with our hostname, in my case

sudo nixos-rebuild switch --flake .#nixos

@jaymehta-g
Copy link

did that but I'm still getting the error.

I fixed the fixmes in flake.nix by setting my hostname and username to the same as what hostname and whoami show, then did sudo nixos-rebuild switch --flake .#nixos because nixos was my hostname. I still get the errors though

error: flake git+file:///home/jay/Downloads/nix-starter-configs 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

@jaymehta-g
Copy link

did that but I'm still getting the error.

I fixed the fixmes in flake.nix by setting my hostname and username to the same as what hostname and whoami show, then did sudo nixos-rebuild switch --flake .#nixos because nixos was my hostname. I still get the errors though

error: flake git+file:///home/jay/Downloads/nix-starter-configs 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

I wasn't running with sudo lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants