cluster/machines/dcr01s22: pivot to mirrored efi boot

Change-Id: I673bad18915ee76e0f35c56e689345f360d295dc
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1771
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/cluster/machines/dcr01s22.hswaw.net.nix b/cluster/machines/dcr01s22.hswaw.net.nix
index a17e04c..2fd9ea0 100644
--- a/cluster/machines/dcr01s22.hswaw.net.nix
+++ b/cluster/machines/dcr01s22.hswaw.net.nix
@@ -11,10 +11,28 @@
   nix.maxJobs = 48;
 
 
-  boot.loader.grub.device = "/dev/disk/by-id/ata-Samsung_SSD_860_EVO_250GB_S3YJNX1M604518E";
-  #fileSystems."/".device = "/dev/disk/by-uuid/b4149083-49fe-4951-a143-aff4cedaf33a";
   fileSystems."/".device = "/dev/vg-nixos-hscloud/nixos-root";
 
+  fileSystems."/boot1" =
+    { device = "/dev/disk/by-partuuid/86610640-6d3c-423d-8c2d-011f32393a67";
+      fsType = "vfat";
+    };
+  fileSystems."/boot2" =
+    { device = "/dev/disk/by-partuuid/4bb9ddf4-cd1c-4d9f-9f4a-a20bb40d8040";
+      fsType = "vfat";
+    };
+  boot.loader.systemd-boot.enable = false;
+  boot.loader.efi.canTouchEfiVariables = true;
+  boot.loader.grub = {
+    enable = true;
+    version = 2;
+    efiSupport = true;
+    mirroredBoots = [
+      { devices = [ "nodev" ]; path = "/boot1"; efiSysMountPoint = "/boot1"; }
+      { devices = [ "nodev" ]; path = "/boot2"; efiSysMountPoint = "/boot2"; }
+    ];
+  };
+
 
   hscloud.base = {
     mgmtIf = "enp130s0f0";