From 6239ce20afdc699fe8057d8fe1389d6895ad8730 Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Tue, 23 Jul 2019 14:05:38 -0500 Subject: [PATCH] nix-darwin: add docs --- doc/installation.xml | 76 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/doc/installation.xml b/doc/installation.xml index 77f6e167e..0e4c904e5 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -230,7 +230,81 @@ home-manager.useUserPackages = true; nix-darwin module - To be done. + Home Manager provides a module that allows you to prepare user + environments directly from the nix-darwin configuration file, which often is + more convenient than using the home-manager tool. + + + To make the NixOS module available for use you must + it into your system configuration. This is most conveniently done by adding + a Home Manager channel, for example + + + +# nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager +# nix-channel --update + + + + if you are following Nixpkgs master or an unstable channel and + + + +# nix-channel --add https://github.com/rycee/home-manager/archive/release-19.03.tar.gz home-manager +# nix-channel --update + + + + if you follow a Nixpkgs version 19.03 channel. + + + + It is then possible to add + + + +imports = [ <home-manager/nix-darwin> ]; + + + + to your nix-darwin configuration.nix file, which will + introduce a new NixOS option called whose type + is an attribute set that maps user names to Home Manager configurations. + + + + For example, a nix-darwin configuration may include the lines + + + +home-manager.users.eve = { pkgs, ... }: { + home.packages = [ pkgs.atool pkgs.httpie ]; + programs.bash.enable = true; +}; + + + + and after a darwin-rebuild --switch the user eve's + environment should include a basic Bash configuration and the packages atool + and httpie. + + + + + By default user packages will not be ignored in favor of + , but they will be intalled to + if + + + +home-manager.useUserPackages = true; + + + + is added to the nix-darwin configuration. This option may become the default + value in the future. + +