mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-06 00:51:04 +01:00
deploy: fc189507bc
This commit is contained in:
parent
412123d5e0
commit
2168619797
1 changed files with 22 additions and 1 deletions
23
index.xhtml
23
index.xhtml
|
|
@ -119,7 +119,28 @@ $ sudo nix-channel --update
|
||||||
</code></pre><p>It is then possible to add</p><pre><code class="programlisting nix">imports = [ <home-manager/nixos> ];
|
</code></pre><p>It is then possible to add</p><pre><code class="programlisting nix">imports = [ <home-manager/nixos> ];
|
||||||
</code></pre><p>to your system <code class="literal">configuration.nix</code> file, which will introduce a new
|
</code></pre><p>to your system <code class="literal">configuration.nix</code> file, which will introduce a new
|
||||||
NixOS option called <code class="literal">home-manager.users</code> whose type is an attribute set
|
NixOS option called <code class="literal">home-manager.users</code> whose type is an attribute set
|
||||||
that maps user names to Home Manager configurations.</p><p>For example, a NixOS configuration may include the lines</p><pre><code class="programlisting nix">users.users.eve.isNormalUser = true;
|
that maps user names to Home Manager configurations.</p><p>Alternatively, home-manager installation can be done declaratively through configuration.nix using the following syntax:</p><pre><code class="programlisting nix">{ 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</code></pre><p>For example, a NixOS configuration may include the lines</p><pre><code class="programlisting nix">users.users.eve.isNormalUser = true;
|
||||||
home-manager.users.eve = { pkgs, ... }: {
|
home-manager.users.eve = { pkgs, ... }: {
|
||||||
home.packages = [ pkgs.atool pkgs.httpie ];
|
home.packages = [ pkgs.atool pkgs.httpie ];
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue