nixos/lxd-agent: add system path for exec

This commit is contained in:
Adam Stephens 2023-12-27 22:47:02 -05:00
parent 420b97bf42
commit 3f8b1d2d26
No known key found for this signature in database
2 changed files with 10 additions and 1 deletions

View File

@ -60,7 +60,13 @@ in {
wantedBy = [ "multi-user.target" ];
before = [ "shutdown.target" ];
conflicts = [ "shutdown.target" ];
path = [ pkgs.kmod pkgs.util-linux ];
path = [
pkgs.kmod
pkgs.util-linux
# allow `incus exec` to find system binaries
"/run/current-system/sw"
];
preStart = preStartScript;

View File

@ -53,5 +53,8 @@ in
with subtest("lxd-agent is started"):
machine.succeed("incus exec ${instance-name} systemctl is-active lxd-agent")
with subtest("lxd-agent has a valid path"):
machine.succeed("incus exec ${instance-name} -- bash -c 'true'")
'';
})