clan-infra/modules/single-disk.nix

46 lines
830 B
Nix
Raw Normal View History

2023-07-04 14:43:31 +00:00
{ self, ... }:
let
partitions = {
grub = {
name = "grub";
size = "1M";
2023-07-04 16:09:53 +00:00
type = "ef02";
2023-07-04 14:43:31 +00:00
};
esp = {
name = "ESP";
2023-07-04 16:09:53 +00:00
type = "EF00";
size = "500M";
2023-07-04 14:43:31 +00:00
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "filesystem";
# We use xfs because it has support for compression and has a quite good performance for databases
format = "xfs";
mountpoint = "/";
};
};
};
in
{
imports = [
self.inputs.disko.nixosModules.disko
];
disko.devices = {
disk.sda = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
inherit partitions;
};
};
};
}