about summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2022-12-03 16:00:13 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2022-12-03 16:01:05 +0100
commitc3cfa83884d861f249984a2d59dbff458cb381b8 (patch)
treec747b7e20707e7f1907226ea678b0b8a390f4553 /nixos/modules/virtualisation
parent03472e8df0f790058d3a3763e360a7e1f23f9c97 (diff)
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
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/lxd.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix
index e3eb519b7dddf..c06716e5eb605 100644
--- a/nixos/modules/virtualisation/lxd.nix
+++ b/nixos/modules/virtualisation/lxd.nix
@@ -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";