From 2168619797aa02950b45f862e5457e9ad5936b2c Mon Sep 17 00:00:00 2001
From: khaneliman It is then possible to add to your system For example, a NixOS configuration may include the linesimports = [ <home-manager/nixos> ];
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.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;