nixos-systems/nixos-anywhere/nocix/disk-config.nix
Eli Ribble 803e1d4b4f Merge in working separate nocix config to main nixos-anywhere config
This involves renaming the disks because when I rebooted the VM the disk
names changed. I also made the root disk just 50G and put the rest in
/var, as well as formatting and mounting the big rust disk.
2025-09-08 19:44:59 +00:00

89 lines
1.5 KiB
Nix

# Example to create a bios compatible gpt partition
{ lib, ... }:
{
disko.devices = {
disk = {
sda = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
MBR = {
size = "1M";
type = "EF02"; # for grub MBR
};
boot = {
size = "500M";
type = "EF00"; # for grub MBR
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
root = {
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
sdb = {
device = "/dev/sdb";
type = "disk";
content = {
type = "gpt";
partitions = {
bigdisk = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/mnt/bigdisk";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "50G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
var = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/var";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}