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

I immediately got lost trying to setup home-manager, zero-to-nix could use a home-manager setup page #300

Open
lamont-granquist opened this issue Oct 26, 2023 · 1 comment

Comments

@lamont-granquist
Copy link

Tried to go from the zero-to-nix documentation to installing and using home-manager and haven't had any success with the linked blog post: https://www.bekk.christmas/post/2021/16/dotfiles-with-nix-and-home-manager or this more recent one: https://juliu.is/tidying-your-home-with-nix/

The command nix run . switch at the start gave me this:

No configuration file found. Please create one at ~/.config/home-manager/home.nix

I setup a link from that to pwd/home.nix where I was working and got past that, but then run into various bugs including with an initial home-manager switch:

error: file 'home-manager/home-manager/home-manager.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)

That seems to be a fixed bug with nixpkgs, so I'm not sure why I'm hitting it: NixOS/nixpkgs#247252

When I try it as nix run home-manager switch I get something totally different:

error:
       … while evaluating the attribute 'activationPackage'

         at /nix/store/s9hqca29ncnqq73jkigk2c95bnwkn2pj-source/modules/default.nix:54:3:

           53|
           54|   activationPackage = module.config.home.activationPackage;
             |   ^
           55|

       … while evaluating a branch condition

         at /nix/store/j0jlb33bm31w347w43051hbffgh616jr-source/lib/lists.nix:57:9:

           56|       fold' = n:
           57|         if n == len
             |         ^
           58|         then nul

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `programs.sl' does not exist. Definition values:
       - In `/Users/lamont/nix/home.nix':
           {
             enable = true;
           }

Also when trying to follow the nix manual instructions on how to update nix on macos I get this:

% sudo -i sh -c 'nix-channel --update && nix-env --install --attr nixpkgs.nix && launchctl remove org.nixos.nix-daemon && launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist'
Password:
unpacking channels...
error: attribute 'nixpkgs' in selection path 'nixpkgs.nix' not found

Little bit frustrated today so I'm probably moving on to other things I have to do and will circle around later to see where things stand in a few months, but hopefully I've convinced you that there's a need for a zero-to-nix page on installing home-manager which is always-up-to-date and it doesn't rely on random blog pages which don't use the determinate nix installer.

@ahelwer
Copy link

ahelwer commented Jan 5, 2024

Yeah that linked blog post is both out of date and includes basic syntax errors. It should be removed. The zero-to-nix tutorial is excellent and then it refers you to a blog post that is broken in multiple ways. Bad.

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

2 participants