42 lines
1.0 KiB
Nix
42 lines
1.0 KiB
Nix
let
|
|
jsonConfig = builtins.fromJSON (builtins.readFile ./config.json);
|
|
in {
|
|
disko.devices = {
|
|
disk = {
|
|
main = {
|
|
type = "disk";
|
|
device = jsonConfig.rootDevice;
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
bios = {
|
|
size = "1M";
|
|
type = "EF02"; # for GRUB BIOS boot
|
|
priority = 1;
|
|
};
|
|
esp = {
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = ["defaults" "umask=0077"];
|
|
};
|
|
};
|
|
root = {
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
mountOptions = ["noatime" "nodiratime" "discard"];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|