diff --git a/machines/gamepc/configuration.nix b/machines/gamepc/configuration.nix index eb1eaaa..e6fc959 100644 --- a/machines/gamepc/configuration.nix +++ b/machines/gamepc/configuration.nix @@ -8,11 +8,27 @@ networking.hostName = "gamepc"; - boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; + # boot = { + # loader = { + # systemd-boot.enable = true; + # efi.canTouchEfiVariables = true; + # }; + # }; + + boot.loader.grub = { + enable = true; + efiSupport = true; + efiInstallAsRemovable = true; + mirroredBoots = [ + { + path = "/boot0"; + devices = ["nodev"]; + } + { + path = "/boot1"; + devices = ["nodev"]; + } + ]; }; disko.devices.disk = lib.genAttrs ["0" "1"] (name: { @@ -22,11 +38,13 @@ type = "gpt"; partitions = { ESP = { - size = "500M"; type = "EF00"; + size = "500M"; content = { - type = "mdraid"; - name = "boot"; + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot${name}"; + mountOptions = ["umask=0077"]; }; }; mdadm = { @@ -41,16 +59,16 @@ }); disko.devices.mdadm = { - boot = { - type = "mdadm"; - level = 0; - # metadata = "1.0"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; + # boot = { + # type = "mdadm"; + # level = 1; + # metadata = "1.0"; + # content = { + # type = "filesystem"; + # format = "vfat"; + # mountpoint = "/boot"; + # }; + # }; raid0 = { type = "mdadm"; level = 0;