[Nix-dev] [ANN] Home Manager

Robert Helgesson robert at rycee.net
Sun Jul 2 23:58:00 CEST 2017


Hi All,

While my little Home Manager project has been online at

  https://github.com/rycee/home-manager

since January I haven't really mentioned it much. Although it is far
from complete, I now feel sufficiently confident about its stability and
usefulness to announce it to the wider community.

In short Home Manager is a set of NixOS modules and a command line tool
called `home-manager` that lets you configure your user's environment
similar to how you configure your NixOS system. Since Home Manager uses
the NixOS module system under the hood and therefore supports the nice
things the modules bring, in particular type checking, automatic man
page generation, and merging configurations using the `imports` field.

It is quite similar to nixuser [1] in scope and implementation but
differs in some crucial ways, most notably Home Manager lives in a
separate repository from Nixpkgs which I hope makes it easier to get
started. It also works under NixOS 17.03 (which is the version I mostly
use) and to some extent also other Linux distros and even macOS. Though
I have personally only ever used it under NixOS.

A simple Home Manager configuration may look something like

    { pkgs, ... }:

    {
      home.packages = [
        pkgs.htop
        pkgs.fortune
      ];

      programs.emacs = {
        enable = true;
        extraPackages = epkgs: [
          epkgs.nix-mode
          epkgs.magit
        ];
      };

      programs.firefox = {
        enable = true;
        enableAdobeFlash = true;
      };

      services.gpg-agent = {
        enable = true;
        defaultCacheTtl = 1800;
        enableSshSupport = true;
      };
    }

I have also written a more elaborate description of the project on my
website which you can reach at

  https://rycee.net/posts/2017-07-02-manage-your-home-with-nix.html

Please have a look and give Home Manager a try if you are feeling
adventurous. Feedback is most welcome!

/rycee

[1] https://github.com/NixOS/nixpkgs/pull/9250



More information about the nix-dev mailing list