A practical kickstart to home manager

When I first tried Nix, I spent a lot of time bouncing off various in-depth tutorials and documentation, but it had taken me a while to actually get started with anything really useful to build on. Some coworkers were interested in getting started with home manager and nix in general and I didn’t actually know where to point them as a single source, so I wrote this to get them started. Will add to it over time if there’s interest.


You make me laughing loud. I enjoy following (mostly reading and share the beginner feeling) your text. And already forked your nixos-configuration …
Thank you

1 Like

I very much enjoyed this form of instruction. Thank you! I was able to understand the flake form at a practical level and could dive into the why’s and structure after getting a working template.

I tried to submit two issues to GitHub but the new account got flagged as spam.

Add cd directive to 02 Init a git repository

The git commands are missing a change directory between the directory creation and git init

mkdir my-home-manager
cd my-home-manager
git init

The instructions linked to install home-manager point the user to install home-manager with

nix-shell '<home-manager>' -A install

In order to progress I had to add a nixpkgs channel and update the $NIX_PATH in my environment:

nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
export NIX_PATH=$NIX_PATH:$HOME/.nix-defexpr/channels

Also using the nix-shell install method wiped the home-manager path after the first make command that runs home-manager switch.

I was able to get home-manager persistently available with nix profile install home-manager. I’m not sure if this my unfamiliarity with nix or if the instructions are unclear for a multi-user nix install on a foreign distro.

1 Like

Glad it was helpful!

Good catch on the missing cd, I’ve added it just now.

I’m a little wary of adding more complicated home manager troubleshooting to this guide, because that should really be part of the home manager docs and will depend on the user. For my part, I followed the standalone instructions on an Ubuntu machine and it worked out of the box. I kind of like your version better and may try that the next time I have to install home manager on a non-NixOS system, but there are many different ways to get it installed and I’d rather just defer to the docs.

1 Like

I just started with Nix for 3 days already and I’m still reading through the wiki trying to find a better way to modularise my configuration.

As a matter of fact, I was looking to combine my home-manager config within my flake and you just helped me a lot with this repo.

Thanks so much :slight_smile:

1 Like

Just wanted to say thanks, this has been a god sent, I have been using other configs with crazy things I can only figure out some of the time. This guide made me laugh, see the error of my way and love what im seeing, Really thanks a mil.

PS: I believe this will work on NIXOS too

1 Like