hosts/{caramel,dandelion}: decommission

This commit is contained in:
LavaDesu 2025-03-15 22:50:44 +11:00
parent 4a71a4cb79
commit bebaa0c14f
Signed by: cilly
GPG key ID: 6500251E087653C9
12 changed files with 0 additions and 308 deletions

View file

@ -1,35 +0,0 @@
{ config, lib, ... }:
let
bind = src: {
depends = [ "/nix" ];
device = src;
fsType = "none";
neededForBoot = true;
options = [ "bind" ];
};
mkLabelMount = label: type: lazy: {
device = "/dev/disk/by-label/${label}";
fsType = type;
options = [ "defaults" "relatime" ] ++ lib.optionals lazy [ "nofail" ];
};
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" false // {
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
};
submount = mkBtrfsMount "DANDELION";
in {
fileSystems = {
"/" = {
device = "rootfs";
fsType = "tmpfs";
options = [ "defaults" "size=12G" "mode=755" ];
};
"/boot" = submount "/@/boot" false;
"/boot/efi" = mkLabelMount "UEFI" "vfat" true;
"/nix" = submount "/@/nix" false;
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
"/persist/.snapshots" = submount "/snap/persist" false;
"/var/log/journal" = bind "/persist/journal";
};
}