I want to add the home-manager channel to my configuration.nix, then install home-manager

I don't have experience with NixOS. A simple code snippet is much appreciated, if possible.

1 Answer 1


There is a good article about that in the NixOs Wiki. Basically, you need to import two things in your configuration.nix:

  • The resources from the home-manager's GitHub repository
  • Your own home.nix config (see the README on GitHub for examples)
imports = [
    (import "${builtins.fetchTarball https://github.com/rycee/home-manager/archive/master.tar.gz}/nixos")

You might also need to add home-manager to your list of packages to be installed.

You must log in to answer this question.