nixos-config/disko/luks-btrfs-subvolumes-new.nix
Sravan Balaji b2ecd969fd Fix Disko Config for Current System and Fix dwm polybar override
- Restore luks-btrfs-subvolumes.nix to old subvolume / swap size
- Make a copy of modified luks-btrfs-subvolumes.nix for future use
- Disable the polybar patch step which doesn't work
- Add git as a build input for polybar-dwm-module
2024-03-30 16:38:59 -04:00

78 lines
2.3 KiB
Nix

let
installDisk = "sda";
bootPartitionSize = "512M";
swapfileSize = "10G";
in {
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/" + installDisk;
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = bootPartitionSize;
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@games" = {
mountpoint = "/games";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@log" = {
mountpoint = "/var/log";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@swap" = {
mountpoint = "/swap";
swap.swapfile.size = swapfileSize;
};
"@.snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};
};
};
};
};
};
};
}