infrastructure/machines/nixos/web01/disko.nix
Tom Hubrecht ecbad0a638
All checks were successful
Check workflows / check_workflows (push) Successful in 21s
Run pre-commit on all files / check (push) Successful in 24s
Check meta / check_dns (pull_request) Successful in 19s
Check meta / check_meta (pull_request) Successful in 18s
Check workflows / check_workflows (pull_request) Successful in 19s
Build all the nodes / bridge01 (pull_request) Successful in 1m13s
Build all the nodes / geo01 (pull_request) Successful in 1m14s
Build all the nodes / compute01 (pull_request) Successful in 1m44s
Build all the nodes / geo02 (pull_request) Successful in 1m12s
Build all the nodes / rescue01 (pull_request) Successful in 1m30s
Build all the nodes / storage01 (pull_request) Successful in 1m29s
Build all the nodes / vault01 (pull_request) Successful in 1m26s
Build all the nodes / web02 (pull_request) Successful in 1m19s
Run pre-commit on all files / check (pull_request) Successful in 24s
Build all the nodes / web01 (pull_request) Successful in 1m56s
Build all the nodes / web03 (pull_request) Successful in 1m25s
chore: Abstract machines and modules
This adds subdirectories for the different types of systems, for the
modules and the machines
2024-12-08 13:39:10 +01:00

82 lines
2.2 KiB
Nix

_:
let
luksName = "mainfs";
in
{
boot.initrd.luks.devices.${luksName} = {
keyFile = "/dev/zero";
keyFileSize = 1;
};
disko.devices = {
disk = {
vdb = {
device = "/dev/vdb";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
start = "1MiB";
label = "ESP";
end = "512MiB";
type = "EF00";
priority = 1;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
start = "512MiB";
end = "-4GiB";
content = rec {
type = "luks";
name = luksName;
extraOpenArgs = [ "--keyfile-size=1" ];
extraFormatArgs = extraOpenArgs;
settings.keyFile = "/dev/zero";
content = {
type = "btrfs";
mountpoint = "/mnt/btrfs-root";
subvolumes = {
"/rootfs" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" ];
};
"/home" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/home";
};
"/var-log" = {
mountOptions = [ "compress=zstd" ];
mountpoint = "/var/log";
};
"/nix" = {
mountOptions = [
"noatime"
"compress=zstd"
];
mountpoint = "/nix";
};
};
};
};
};
swap = {
label = "swap";
start = "-4GiB";
end = "100%";
priority = 3;
content = {
type = "swap";
randomEncryption = true;
};
};
};
};
};
};
};
}