diff options
| author | tv <tv@krebsco.de> | 2026-11-12 01:19:54 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-12 01:19:54 +0000 |
| commit | ea6d6b16fa422d3fb0a7fea671d3637b89751721 (patch) | |
| tree | 43ed25bab755e8884d8b1f070464ebe63415ffb8 /tests/nixos-rebuild.sh | |
| parent | 69f0ab4533a6b233dca1193ee558de8994df1ffb (diff) | |
krops writeDeploy: pass --use-remote-sudo only with a separate build target
For targets using sudo, writeDeploy runs nixos-rebuild on the target via
sudo, so --use-remote-sudo has no effect there. It only matters when
nixos-rebuild runs on a separate build target and activates the system
on the target, so writeDeploy passes it only then.
A new VM test, deploy, runs writeDeploy with a stand-in for
nixos-rebuild, which records the user it runs as, NIX_PATH, and its
arguments, for deploying flakes and other sources, with and without a
separate build target, to every kind of target.
Diffstat (limited to 'tests/nixos-rebuild.sh')
| -rwxr-xr-x | tests/nixos-rebuild.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/nixos-rebuild.sh b/tests/nixos-rebuild.sh new file mode 100755 index 0000000..9e2e47e --- /dev/null +++ b/tests/nixos-rebuild.sh @@ -0,0 +1,8 @@ +#! /bin/sh +# Stands in for nixos-rebuild: records the user it runs as, NIX_PATH, and its +# arguments in /tmp/nixos-rebuild.log. +{ + id -u + printf '%s\n' "${NIX_PATH-}" + printf '%s\n' "$*" +} > /tmp/nixos-rebuild.log |
