diff --git a/index.xhtml b/index.xhtml index a1e701c36..563bf0ea6 100644 --- a/index.xhtml +++ b/index.xhtml @@ -119,7 +119,28 @@ $ sudo nix-channel --update
It is then possible to add
imports = [ <home-manager/nixos> ];
to your system configuration.nix file, which will introduce a new
NixOS option called home-manager.users 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;
+that maps user names to Home Manager configurations.Alternatively, home-manager installation can be done declaratively through configuration.nix using the following syntax:
{ config, pkgs, lib, ... }:
+
+let
+ home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz;
+in
+{
+ imports =
+ [
+ (import "${home-manager}/nixos")
+ ];
+
+ users.users.eve.isNormalUser = true;
+ home-manager.users.eve = { pkgs, ... }: {
+ home.packages = [ pkgs.atool pkgs.httpie ];
+ programs.bash.enable = true;
+
+ # The state version is required and should stay at the version you
+ # originally installed.
+ home.stateVersion = "24.11";
+ };
+}
+
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;