Geoffrey Frogeye
36608fa9e4
It took 3 days to investigate by myself and only get a partial idea of the issue, but 5 minutes to ask for support and another 5 to get a working solution. Hopefully lesson learned.
66 lines
2 KiB
Nix
66 lines
2 KiB
Nix
{
|
|
disko.devices = {
|
|
disk = {
|
|
pindakaas_sd = {
|
|
type = "disk";
|
|
device = "/dev/disk/by-id/mmc-SN32G_0xfb19ae99";
|
|
content = {
|
|
type = "gpt";
|
|
partitions = {
|
|
ESP = {
|
|
# Needs enough to store multiple kernel generations
|
|
size = "512M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
mountOptions = [
|
|
"defaults"
|
|
];
|
|
};
|
|
};
|
|
luks = {
|
|
size = "100%";
|
|
content = {
|
|
type = "luks";
|
|
name = "pindakaas_sd";
|
|
passwordFile = "/tmp/secret.key"; # TODO Generate this somehow
|
|
settings = {
|
|
# Not having SSDs die fast is more important than crypto
|
|
# nerds that could potentially discover which filesystem I
|
|
# use from TRIM patterns
|
|
allowDiscards = true;
|
|
};
|
|
content = {
|
|
type = "btrfs";
|
|
extraArgs = [ "-f" ];
|
|
subvolumes = {
|
|
"/nixos" = {
|
|
mountpoint = "/";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
"/home" = {
|
|
mountpoint = "/home";
|
|
mountOptions = [ "compress=zstd" "relatime" ];
|
|
};
|
|
"/nix" = {
|
|
mountpoint = "/nix";
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
|
};
|
|
# Maybe later
|
|
# "/swap" = {
|
|
# mountpoint = "/.swapvol";
|
|
# swap.swapfile.size = "20M";
|
|
# };
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|