diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-19 14:40:24 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-05 23:15:18 +0100 |
commit | cfd468adbb9b8b5430a6cecf02d8f6ff76e7360c (patch) | |
tree | 4fbfebbeb7ffd732a768e87946fc1a48fdac00f5 /nixos/doc | |
parent | 26e4d09c9cd847a0453d3edb730b9dfe3b1add57 (diff) |
nixos-rebuild: Use /etc/nixos/flake.nix if it exists
Diffstat (limited to 'nixos/doc')
-rw-r--r-- | nixos/doc/manual/man-nixos-rebuild.xml | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index 81e2f8bb279e..4341b8918df8 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -140,14 +140,17 @@ <title>Description</title> <para> - This command updates the system so that it corresponds to the configuration - specified in <filename>/etc/nixos/configuration.nix</filename>. Thus, every - time you modify <filename>/etc/nixos/configuration.nix</filename> or any - NixOS module, you must run <command>nixos-rebuild</command> to make the - changes take effect. It builds the new system in - <filename>/nix/store</filename>, runs its activation script, and stop and - (re)starts any system services if needed. Please note that user services need - to be started manually as they aren't detected by the activation script at the moment. + This command updates the system so that it corresponds to the + configuration specified in + <filename>/etc/nixos/configuration.nix</filename> or + <filename>/etc/nixos/flake.nix</filename>. Thus, every time you + modify the configuration or any other NixOS module, you must run + <command>nixos-rebuild</command> to make the changes take + effect. It builds the new system in + <filename>/nix/store</filename>, runs its activation script, and + stop and (re)starts any system services if needed. Please note that + user services need to be started manually as they aren't detected + by the activation script at the moment. </para> <para> @@ -526,8 +529,10 @@ </term> <listitem> <para> - Build the NixOS system from the specified flake. The flake must - contain an output named + Build the NixOS system from the specified flake. It defaults to + the directory containing the target of the symlink + <filename>/etc/nixos/flake.nix</filename>, if it exists. The + flake must contain an output named <literal>nixosConfigurations.<replaceable>name</replaceable></literal>, where <replaceable>name</replaceable> denotes the name of the configuration and can be specified using the @@ -596,6 +601,21 @@ <varlistentry> <term> + <filename>/etc/nixos/flake.nix</filename> + </term> + <listitem> + <para> + If this file exists, then <command>nixos-rebuild</command> will + use it as if the <option>--flake</option> option was given. This + file may be a symlink to a <filename>flake.nix</filename> in an + actual flake; thus <filename>/etc/nixos</filename> need not be a + flake. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term> <filename>/run/current-system</filename> </term> <listitem> |