From db911ee1561363906013c062a560afb76ddaadcc Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Wed, 4 Nov 2020 17:09:53 +0000 Subject: [PATCH] porcorosso: add libvirt persistance --- ops/nixos/porcorosso/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ops/nixos/porcorosso/default.nix b/ops/nixos/porcorosso/default.nix index b022ef2fa5..fa31c164e8 100644 --- a/ops/nixos/porcorosso/default.nix +++ b/ops/nixos/porcorosso/default.nix @@ -33,6 +33,9 @@ in { ]; boot.kernelModules = [ "kvm-intel" ]; boot.supportedFilesystems = [ "ntfs" ]; + boot.kernel.sysctl = { + "abi.vsyscall32" = "0"; + }; fileSystems = let zfs = device: { @@ -191,7 +194,16 @@ in { }; systemd.tmpfiles.rules = [ #"L /etc/nixos - - - - /persist/etc/nixos" + "d /var/lib/libvirt 0755 root - - -" ]; + systemd.mounts = [{ + bindsTo = ["libvirtd.service"]; + partOf = ["libvirtd.service"]; + unitConfig.RequiresMountsFor = "/var/lib/libvirt"; + options = "bind"; + what = "/persist/var/lib/libvirt"; + where = "/var/lib/libvirt"; + }]; # Enable Thunderbolt device management. services.hardware.bolt.enable = true;