NixOS module
- To be done.
+ Home Manager provides a NixOS module that allows you to prepare user
+ environments directly from the system configuration file, which often is
+ more convenient than using the home-manager tool. It also
+ opens up additional possibilities, for example, to automatically configure
+ user environments in NixOS declarative containers or on systems deployed
+ through NixOps.
+
+
+ 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-18.09.tar.gz home-manager
+#nix-channel --update
+
+
+
+ if you follow a Nixpkgs version 18.09 channel.
+
+
+
+ It is then possible to add
+
+
+
+imports = [ <home-manager/nixos> ];
+
+
+
+ to your system 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 NixOS configuration may include the lines
+
+
+
+users.users.eve.isNormalUser = true;
+home-manager.users.eve = { pkgs, ... }: {
+ home.packages = [ pkgs.atool pkgs.httpie ];
+ programs.bash.enable = true;
+};
+
+
+
+ and after a nixos-rebuild switch the user eve's
+ environment should include a basic Bash configuration and the packages atool
+ and httpie.
+
+
+
+
+ By default packages will be installed to
+ $HOME/.nix-profile but they can be installed to
+ /etc/profiles if
+
+
+home-manager.useUserPackages = true;
+
+
+ is added to the system configuration. This is necessary if, for example,
+ you wish to use nixos-rebuildĀ build-vm. This option may
+ become the default value in the future.
+
+ nix-darwin module