aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index df4707a..578826e 100644
--- a/README.md
+++ b/README.md
@@ -60,14 +60,16 @@ The basic `configuration.nix` file in the current snapshots looks just like this
This basic setup allows it to boot, starts the OpenSSH server agent and allows
the listed `openssh.authorizedKeys.keys` to login.
-I've also changed the nix-channel to the `nixos-unstable` imperatively before
-creating the image snapshot:
+I've also changed the ownership of `/etc/nixos/configuration.nix` to allow my
+user to write to it by piping through SSH without trying some
+[non-working solutions like before][0]:
```shell
-sudo nix-channel --remove nixos
-sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
+sudo chown andreh /etc/nixos/configuration.nix
```
-So the first run of `./nixos-update.sh` will already get the latest channel from
-unstable, which makes this image not tied to the particular original 19.09 NixOS
-distribution.
+With that `./nixos-update.sh` can write to the NixOS configuration file without
+running into issues with `sudo` password permissions through the SSH pipe while
+writing to stdin.
+
+[0]: https://git.sr.ht/~euandreh/vps/tree/a7983c859f3d8890e35c587176f497b73a7a7dc7/nixos-switch.sh#L7