nixos-wiki-infra/modules/single-disk.nix

42 lines
692 B
Nix
Raw Normal View History

2023-05-14 20:41:19 +02:00
{ self, ... }:
let
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
esp = {
size = "500M";
type = "EF00"; # for grub MBR
2023-05-14 20:41:19 +02:00
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
2023-05-14 20:41:19 +02:00
content = {
type = "filesystem";
format = "ext4";
2023-05-14 20:41:19 +02:00
mountpoint = "/";
};
};
};
2023-05-14 20:41:19 +02:00
in
{
imports = [
self.inputs.disko.nixosModules.disko
];
disko.devices = {
disk.sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
2023-05-14 20:41:19 +02:00
inherit partitions;
};
};
};
}