systems/machines/hermes/filesystems.nix

90 lines
2 KiB
Nix

{
config,
lib,
pkgs,
modulesPath,
...
}:
let
bootUUID = "afbb025b-f483-4b79-9702-645cfca09e8b";
efiUUID = "5E49-BE19";
luuksUUID = "9aaac705-2737-4222-9887-51131acec90c";
cryptrootUUID = "9d76cce0-7e9a-4828-8de2-aab9e07badae";
in
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" = {
device = "/dev/disk/by-uuid/9d76cce0-7e9a-4828-8de2-aab9e07badae";
fsType = "btrfs";
options = [ "subvol=@root" ];
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/${luuksUUID}";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/${bootUUID}";
fsType = "ext4";
};
fileSystems."/efi" = {
device = "/dev/disk/by-uuid/${efiUUID}";
fsType = "vfat";
options = [
"fmask=0137"
"dmask=0027"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
fileSystems."/var/cache" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_cache" ];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_log" ];
};
fileSystems."/var/spool" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_spool" ];
};
fileSystems."/var/tmp" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_tmp" ];
};
fileSystems."/var/lib/machines" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_lib_machines" ];
};
fileSystems."/var/lib/portables" = {
device = "/dev/disk/by-uuid/${cryptrootUUID}";
fsType = "btrfs";
options = [ "subvol=@var_lib_portables" ];
};
swapDevices = [ ];
}