mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 18:54:34 +00:00
Mention multiple configurations option
This commit is contained in:
parent
6002b263d7
commit
904fc0d65a
|
@ -129,6 +129,18 @@ Yay, you're now using NixOS in flakes mode!
|
||||||
> If you run the `sudo nixos-rebuild switch` command, without the `--flake .`
|
> If you run the `sudo nixos-rebuild switch` command, without the `--flake .`
|
||||||
> it would look for the `flake.nix` file in `/etc/nixos`.
|
> it would look for the `flake.nix` file in `/etc/nixos`.
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> Notice the `nixosConfigurations` (plural) key in our flake, suggesting that
|
||||||
|
> it can hold multiple configurations. Indeed, it can! You can use a single
|
||||||
|
> flake to manage multiple systems.
|
||||||
|
>
|
||||||
|
> The name for the configuration just needs to match the hostname of your
|
||||||
|
> machine, which by default will be `nixos`.
|
||||||
|
>
|
||||||
|
> Alternatively, you can also pick which configuration to use manually in the
|
||||||
|
> rebuild command, like so: `nixos-rebuild --flake .#my-configuration`, which
|
||||||
|
> would pick a config named `my-configuration`.
|
||||||
|
|
||||||
You can notice that this also created a `flake.lock` file, containing the exact
|
You can notice that this also created a `flake.lock` file, containing the exact
|
||||||
versions of all of the packages you're using. Let's add this file to git too:
|
versions of all of the packages you're using. Let's add this file to git too:
|
||||||
`git add flake.lock`.
|
`git add flake.lock`.
|
||||||
|
|
Loading…
Reference in a new issue