infra/nix/os/devices/justyna-p300/hw.nix

43 lines
966 B
Nix
Raw Permalink Normal View History

2024-11-15 10:17:56 +01:00
{ nodeFlake, ... }:
{
2024-11-15 10:17:56 +01:00
imports = [ nodeFlake.inputs.disko.nixosModules.disko ];
disko.devices.disk.sda = {
device = "/dev/sda";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "boot";
start = "0";
end = "1M";
part-type = "primary";
2024-11-15 10:17:56 +01:00
flags = [ "bios_grub" ];
}
{
name = "root";
start = "1M";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "btrfs";
2024-11-15 10:17:56 +01:00
extraArgs = [ "-f" ]; # Override existing partition
subvolumes = {
# Subvolume name is different from mountpoint
"/rootfs" = {
mountpoint = "/";
};
"/nix" = {
2024-11-15 10:17:56 +01:00
mountOptions = [ "noatime" ];
};
};
};
}
];
};
};
}