Skip to content

Commit 04f9809

Browse files
Merge #150
150: Future rebuilds should use the flake, not configuration.nix r=zimbatm a=JillThornhill Co-authored-by: JillThornhill <[email protected]> Co-authored-by: JillThornhill <[email protected]>
2 parents 22a2964 + 64c793d commit 04f9809

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,15 @@ Note that this command references the URL of your flake, in this case `.#`,
199199
together with the name of the system `hetzner-cloud`, as highlighted by the
200200
comment in the sample flake.
201201

202+
This will configure and build the new NixOS server. Since the configurations are
203+
defined in the flake, it will not create `/etc/nixos/configuration.nix`. If you
204+
need to make changes to the configuration in future, you should make the changes
205+
in the flake, and rebuild using the --flake option as shown below:
206+
207+
```
208+
nixos-rebuild --flake <flake URL> switch
209+
```
210+
202211
The [Quickstart Guide](./docs/quickstart.md) gives more information on how to
203212
run **nixos-anywhere** in its simplest form. For more specific instructions to
204213
suit individual requirements, see the [How To Guide](./docs/howtos.md).

docs/quickstart.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ directory containing the flake to update `flake.lock` before rerunning
158158
nix flake update
159159
```
160160

161+
The new server's configurations are defined in the flake. `nixos-anywhere` does
162+
not create `etc/nixos/configuration.nix`since it expects the server to be
163+
administered remotely. Any future changes to the configuration should be made to
164+
the flake, and you would reference this flake when doing the rebuild:
165+
166+
```
167+
nixos-rebuild --flake <URL to your flake> switch
168+
```
169+
161170
For more information on different use cases of **nixos-anywhere** please refer
162171
to the [How to Guide](./howtos.md), and for more technical information and
163172
explanation of known error messages, refer to the

0 commit comments

Comments
 (0)