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.
+
+