diff --git a/flake.nix b/flake.nix index 3fd270b..81d6b42 100644 --- a/flake.nix +++ b/flake.nix @@ -157,7 +157,6 @@ buildbot = ./modules/nixos/buildbot.nix; builder = ./modules/nixos/builder.nix; community-builder = ./modules/nixos/community-builder; - disko-raid = ./modules/nixos/disko-raid.nix; disko-zfs = ./modules/nixos/disko-zfs.nix; github-org-backup = ./modules/nixos/github-org-backup.nix; hercules-ci = ./modules/nixos/hercules-ci; diff --git a/modules/nixos/disko-raid.nix b/modules/nixos/disko-raid.nix deleted file mode 100644 index dd03f19..0000000 --- a/modules/nixos/disko-raid.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ inputs, lib, config, ... }: -let - mirrorBoot = idx: { - type = "disk"; - device = "/dev/nvme${idx}n1"; - content = { - type = "gpt"; - partitions = { - boot = { - size = "1M"; - type = "EF02"; # for grub MBR - }; - ESP = { - size = "1G"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot${idx}"; - mountOptions = [ "nofail" ]; - }; - }; - raid-root = { - size = "100%"; - content = { - type = "mdraid"; - name = "root"; - }; - }; - }; - }; - }; -in -{ - imports = [ - inputs.disko.nixosModules.disko - ]; - options = { - nixCommunity.disko.raidLevel = lib.mkOption { - type = lib.types.int; - default = 1; - description = "RAID level to use for the root partition"; - }; - }; - config = { - # this is both efi and bios compatible - boot.loader.grub = { - enable = true; - efiSupport = true; - efiInstallAsRemovable = true; - devices = lib.mkForce [ ]; # disko adds /boot here, we want /boot0 /boot1 - mirroredBoots = [ - { path = "/boot0"; devices = [ "/dev/nvme0n1" ]; } - { path = "/boot1"; devices = [ "/dev/nvme1n1" ]; } - ]; - }; - - disko.devices = { - disk = { - x = mirrorBoot "0"; - y = mirrorBoot "1"; - }; - mdadm.root = { - type = "mdadm"; - level = config.nixCommunity.disko.raidLevel; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - }; - }; - }; - }; -}