nixos/lxc-container: use absolute path for ln in install-lxc-sbin-init.sh

Recent change to nixos-rebuild (https://github.com/NixOS/nixpkgs/pull/258571)
adds systemd-run, which brings with it a cleaner environment
(ie $PATH not available).
Workaround: use absolute path for ln to avoid command-not-found error
This commit is contained in:
Joseph Stahl 2023-10-17 13:38:37 -05:00 committed by Artturin
parent cb44be3b01
commit d156ab6c9c

View file

@ -66,7 +66,7 @@ in {
system.build.installBootLoader = pkgs.writeScript "install-lxd-sbin-init.sh" ''
#!${pkgs.runtimeShell}
ln -fs "$1/init" /sbin/init
${pkgs.coreutils}/bin/ln -fs "$1/init" /sbin/init
'';
systemd.additionalUpstreamSystemUnits = lib.mkIf cfg.nestedContainer ["systemd-udev-trigger.service"];