diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 195c5259a324..35f5c4070b5a 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -426,9 +426,11 @@ in libvirt/qemu/networks/*.xml \ libvirt/nwfilter/*.xml ); do - mkdir -p /var/lib/$(dirname $i) -m 755 - if [ ! -e /var/lib/$i ]; then - cp -pd ${cfg.package}/var/lib/$i /var/lib/$i + # Intended behavior + # shellcheck disable=SC2174 + mkdir -p "/var/lib/$(dirname "$i")" -m 755 + if [ ! -e "/var/lib/$i" ]; then + cp -pd "${cfg.package}/var/lib/$i" "/var/lib/$i" fi done @@ -440,9 +442,7 @@ in ln -s --force "$emulator" /run/${dirName}/nix-emulators/ done - for helper in bin/qemu-pr-helper; do - ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/ - done + ln -s --force ${cfg.qemu.package}/bin/qemu-pr-helper /run/${dirName}/nix-helpers/ ${optionalString cfg.qemu.ovmf.enable (let ovmfpackage = pkgs.buildEnv {