aboutsummaryrefslogtreecommitdiff
path: root/systems/zoldene/virtualisation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'systems/zoldene/virtualisation.nix')
-rw-r--r--systems/zoldene/virtualisation.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/systems/zoldene/virtualisation.nix b/systems/zoldene/virtualisation.nix
index d2212fe..424f43f 100644
--- a/systems/zoldene/virtualisation.nix
+++ b/systems/zoldene/virtualisation.nix
@@ -6,6 +6,14 @@
6 virtualisation.docker.enable = true; 6 virtualisation.docker.enable = true;
7 disko.devices.zpool.zfast.datasets."root/persist/var/lib/docker" = 7 disko.devices.zpool.zfast.datasets."root/persist/var/lib/docker" =
8 { type = "zfs_fs"; mountpoint = "/persist/zfast/var/lib/docker"; options.mountpoint = "legacy"; }; 8 { type = "zfs_fs"; mountpoint = "/persist/zfast/var/lib/docker"; options.mountpoint = "legacy"; };
9 systemd.services.docker.after = [
10 "var-lib-docker.mount"
11 "persist-zfast-var-lib-docker.mount"
12 ];
13 systemd.services.docker.unitConfig.BindsTo = [
14 "var-lib-docker.mount"
15 "persist-zfast-var-lib-docker.mount"
16 ];
9 17
10 ### Enable LXC 18 ### Enable LXC
11 disko.devices.zpool.zfast.datasets."root/persist/var/lib/lxc" = 19 disko.devices.zpool.zfast.datasets."root/persist/var/lib/lxc" =
@@ -14,12 +22,21 @@
14 enable = true; 22 enable = true;
15 lxcfs.enable = true; 23 lxcfs.enable = true;
16 }; 24 };
25 systemd.services.lxc.after = [
26 "var-lib-lxc.mount"
27 "persist-zfast-var-lib-lxc.mount"
28 ];
29 systemd.services.lxc.unitConfig.BindsTo = [
30 "var-lib-lxc.mount"
31 "persist-zfast-var-lib-lxc.mount"
32 ];
17 33
18 ### Enable libvirtd 34 ### Enable libvirtd
19 virtualisation.libvirtd = { 35 virtualisation.libvirtd = {
20 enable = true; 36 enable = true;
21 qemu.package = pkgs-no-overlay.qemu; 37 qemu.package = pkgs-no-overlay.qemu;
22 }; 38 };
39 # No persistence for libvirtd: config is supposed to be persisted via config
23 40
24 ### Persistence for LXC / Docker 41 ### Persistence for LXC / Docker
25 environment.persistence."/persist/zfast".directories = [ 42 environment.persistence."/persist/zfast".directories = [
@@ -43,4 +60,3 @@
43 "net.ipv4.conf.default.forwarding" = true; 60 "net.ipv4.conf.default.forwarding" = true;
44 }; 61 };
45} 62}
46