nixos/lxd: add missing util-linux to $PATH

This fixes `lxd init`, which previously failed like this:

  $ yes "" | lxd init
  [...]
  Error: Failed to create storage pool "default": Failed to run: losetup --find --nooverlap --direct-io=on --show /var/lib/lxd/disks/default.img: exec: "losetup": executable file not found in $PATH

(cherry picked from commit c3cfa83884)
This commit is contained in:
Bjørn Forsman
2022-12-03 16:00:13 +01:00
committed by github-actions[bot]
parent 527bba34ac
commit cc82cbb14a

View File

@@ -140,7 +140,8 @@ in {
];
documentation = [ "man:lxd(1)" ];
path = optional cfg.zfsSupport config.boot.zfs.package;
path = [ pkgs.util-linux ]
++ optional cfg.zfsSupport config.boot.zfs.package;
serviceConfig = {
ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd";