Skip to content

Commit

Permalink
quickstart: clarify updating docs (#191)
Browse files Browse the repository at this point in the history
* quickstart: clarify updating docs

* fix typo

Co-authored-by: dantefromhell <[email protected]>

---------

Co-authored-by: dantefromhell <[email protected]>
  • Loading branch information
Mic92 and dantefromhell authored Aug 27, 2023
1 parent 2b06f6c commit 0f5f957
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,26 @@ nix flake update
```

The new server's configurations are defined in the flake. `nixos-anywhere` does
not create `etc/nixos/configuration.nix`since it expects the server to be
not create `etc/nixos/configuration.nix`, since it expects the server to be
administered remotely. Any future changes to the configuration should be made to
the flake, and you would reference this flake when doing the rebuild:
the flake, and you would reference this flake when doing the nixos-rebuild
command or a deployment tool of your choice i.e.
[colmena](https://github.com/zhaofengli/colmena),
[nixinate](https://github.com/MatthewCroughan/nixinate).

This example can be run from the machine itself for updating (replace
`<URL to your flake>` with your flake i.e. `.#` if your flake is in the current
directory):

```
nixos-rebuild switch --flake <URL to your flake>
```

You can also run `nixos-rebuild` to update a machine remotly, if you have set up
an openssh server and your ssh key for the root user:

```
nixos-rebuild --flake <URL to your flake> switch
nixos-rebuild switch --flake <URL to your flake> --target-host "root@<ip address>"
```

For more information on different use cases of **nixos-anywhere** please refer
Expand Down

0 comments on commit 0f5f957

Please sign in to comment.