Home Manager Configuration

Hi everyone,

I’m new to nix but I choose to dive right in NixOs and not just nix-shell (from fedora).

I’m really interested in declarative configuration of my computer / home, so I want to use home-manager.

My system configuration is available here: My NixOs configuration · GitHub

I really like it, but my main concern is that after each reboot of my computer I’ve to do:

$nix-shell -p home-manager --run 'cd .config/nixpkgs/ && home-manager build && home-manager switch'

Witch is a bit of pain at every boot, especially when I’ve no network…
Am’I doing something wrong in my configuration.nix that home-manager is not properly loaded at startup ?

Thanks for your time and answers.

Are you sourcing ~/.nix-profile/etc/profile.d/nix.sh?

That looks as if you are using HM as a module

If my assumption is true, then you should not use home-manager CLI tool at all, but instead do all of your HM in the system configuration.

No, I do not, but I’m using fish not bash.

What I want is:

  • have the least package in “root”,
  • users manage all their packages with a config file (as I understand not nix-env), so they do not need to be root to add/remove package on their own.

So if I understand you well, I should remove the nixos module, and home-manager as a standalone module ?
Is it correct ?

Ok I’ve updated my gist with my new configuration.

Thank you @NobbZ it work much better now :slight_smile:

You want to source that file or the fish equivalent

Ok, i’ve check and indeed, the fish default config file (~/.config/fish/config.fish) is generated and init all needed informations.

Hosted by Flying Circus.