]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/system/dilion.nix
Migrate dilion to ZFS
[perso/Immae/Config/Nix.git] / modules / private / system / dilion.nix
index ca9a0521d7b0602d48518a4a5c13b8468b705b9c..14155efc50ee22119f9e736c72869263057c7a38 100644 (file)
@@ -5,6 +5,19 @@
   boot.kernelPackages = pkgs.linuxPackages_latest;
   myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
 
+  fileSystems = {
+    "/"           = lib.mkForce { fsType = "zfs"; device = "zpool/root"; };
+    "/boot"       = { fsType = "ext4"; device = "/dev/disk/by-uuid/fd1c511e-2bc0-49d5-b8bb-95e7e8c8c816"; };
+    "/etc"        = { fsType = "zfs"; device = "zpool/root/etc"; };
+    "/home"       = { fsType = "zfs"; device = "zpool/root/home"; };
+    "/home/immae" = { fsType = "zfs"; device = "zpool/root/home/immae"; };
+    "/tmp"        = { fsType = "zfs"; device = "zpool/root/tmp"; };
+    "/var"        = { fsType = "zfs"; device = "zpool/root/var"; };
+  };
+  boot.initrd.secrets = {
+    "/boot/pass.key" = "/boot/pass.key";
+  };
+
   networking = {
     hostId = "27c3048d"; # generated with head -c4 /dev/urandom | od -A none -t x4
     firewall.enable = false;
@@ -82,6 +95,7 @@
     install -m 0755 -o root -g root -d /var/lib/caldance
   '';
   virtualisation.docker.enable = true;
+  virtualisation.docker.storageDriver = "zfs";
   virtualisation.libvirtd.enable = true;
   users.extraUsers.immae.extraGroups = [ "libvirtd" "docker" ];
   systemd.services.libvirtd.postStart = ''