mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-14 21:11:08 +01:00
home-manager: Add --flake option to home-manager (#1856)
Implements a --flake options for build and switch, along with the usual flake related optons (for lock-files etc). Configurations in the flake are automatically discovered in the following order: 1. `outputs.homeConfigurations."$flake-uri"` (the `--flake parameter`) 2. `outputs.homeConfigurations."$USERNAME@$HOSTNAME"` 3. `outputs.homeConfigurations."$USERNAME"` Make home-manager use default configuration from ~/.config/nixpkgs/flake.nix, if it exists and nothing else is specified. Co-authored-by: Nicolas Berbiche <nicolas@normie.dev>
This commit is contained in:
parent
e5a260a569
commit
3a16ebdf72
3 changed files with 95 additions and 10 deletions
|
|
@ -66,6 +66,10 @@
|
|||
-I <replaceable>path</replaceable>
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
--flake <replaceable>flake-uri</replaceable>
|
||||
</arg>
|
||||
|
||||
<arg>
|
||||
-b <replaceable>ext</replaceable>
|
||||
</arg>
|
||||
|
|
@ -160,7 +164,7 @@
|
|||
<title>Description</title>
|
||||
<para>
|
||||
This command updates the user environment so that it corresponds to the
|
||||
configuration specified in <filename>~/.config/nixpkgs/home.nix</filename>.
|
||||
configuration specified in <filename>~/.config/nixpkgs/home.nix</filename> or <filename>~/.config/nixpkgs/flake.nix</filename>.
|
||||
</para>
|
||||
<para>
|
||||
All operations using this tool expects a sub-command that indicates the
|
||||
|
|
@ -343,6 +347,18 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option>--flake <replaceable>flake-uri[#name]</replaceable></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Build Home Manager configuration from the flake, which must contain the
|
||||
output homeConfigurations.name. If no name is specified it will first try
|
||||
username@hostname and then username.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option>-b <replaceable>extension</replaceable></option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue