ryan4yin / nixos-and-flakes-book

:hammer_and_wrench: :heart: Want to know NixOS & Flakes in detail? Looking for a beginner-friendly tutorial? Then you've come to the right place! 想要学习使用 NixOS 与 Flakes 吗?在寻找一份新手友好的教程?那你可来对地方了!
https://nixos-and-flakes.thiscute.world
Creative Commons Attribution Share Alike 4.0 International
2.07k stars 105 forks source link

Command slightly wrong #51

Closed Biepa closed 12 months ago

Biepa commented 1 year ago

On https://nixos-and-flakes.thiscute.world/nixos-with-flakes/start-using-home-manager

There is the part: "Then run sudo nixos-rebuild switch to apply the configuration, and home-manager will be installed automatically."

I went trough it twice and it did not work for me, but "sudo nixos-rebuild switch --flake /etc/nixos#nixos-test" did.

Obviously I'm a beginner with NixOs, so let me know if I missed anything.

nykma commented 1 year ago

Same for me. I found the "standalone install guide" on HomeManager's doc

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install

to get my home-manager executable usable.

Seems like this way is not that flake-y, still waiting for a more flake-y solution.

ryan4yin commented 12 months ago

Fixed by https://github.com/ryan4yin/nixos-and-flakes-book/commit/4f60d3ccc816df6144647b2f2cbc8397c0fe6158

ryan4yin commented 12 months ago

to get my home-manager executable usable. -- @nykma

The home-manager executable is not necessary, nixos-rebuild is all you need.