aboutsummaryrefslogtreecommitdiffstats
path: root/tests/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-12 01:19:54 +0000
committertv <tv@krebsco.de>2026-11-12 01:19:54 +0000
commitea6d6b16fa422d3fb0a7fea671d3637b89751721 (patch)
tree43ed25bab755e8884d8b1f070464ebe63415ffb8 /tests/default.nix
parent69f0ab4533a6b233dca1193ee558de8994df1ffb (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/default.nix')
-rw-r--r--tests/default.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/default.nix b/tests/default.nix
index e9ea769..1f3de5c 100644
--- a/tests/default.nix
+++ b/tests/default.nix
@@ -1,5 +1,5 @@
-# NixOS VM tests for populate, one test per source type, plus one for
-# features spanning sources. Build all with nix-build tests, or one with,
+# NixOS VM tests for populate, one test per source type, one for features
+# spanning sources, and one for writeDeploy's arguments to nixos-rebuild. Build all with nix-build tests, or one with,
# e.g., nix-build tests -A flake.
{ pkgs ? import ../pkgs {} }:
@@ -12,6 +12,7 @@ let
inherit (pkgs) lib;
krops = import ../lib;
inherit (pkgs) populate;
+ inherit (pkgs.krops) writeDeploy;
url = "http://deployer:8000";
gitUrl = "git://deployer/gitsrc.git";
remoteHost = "target";