Commit d156ab6c authored by Joseph Stahl's avatar Joseph Stahl Committed by Artturin
Browse files

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
parent cb44be3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"];