diff --git a/nixos-anywhere-nocix/disk-config.nix b/nixos-anywhere-nocix/disk-config.nix index 75ae234..1894dde 100644 --- a/nixos-anywhere-nocix/disk-config.nix +++ b/nixos-anywhere-nocix/disk-config.nix @@ -1,56 +1,32 @@ # Example to create a bios compatible gpt partition { lib, ... }: { - disko.devices = { - disk.disk1 = { - device = lib.mkDefault "/dev/sda"; - type = "disk"; - content = { - type = "gpt"; - partitions = { - boot = { - name = "boot"; - size = "1M"; - type = "EF02"; - }; - esp = { - name = "ESP"; - size = "500M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - name = "root"; - size = "100%"; - content = { - type = "lvm_pv"; - vg = "pool"; - }; - }; - }; - }; - }; - lvm_vg = { - pool = { - type = "lvm_vg"; - lvs = { - root = { - size = "100%FREE"; - content = { - type = "filesystem"; - format = "ext4"; - mountpoint = "/"; - mountOptions = [ - "defaults" - ]; - }; - }; - }; - }; - }; - }; + disko.devices = { + disk = { + sdb = { + device = "/dev/sdb"; + type = "disk"; + content = { + type = "table"; + format = "mbr"; + partitions = { + boot = { + size = "500M"; + type = "EF02"; # for grub MBR + attributes = [ 0 ]; # partition attribute + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + + }; + }; + }; + }; + }; }