Modify disko BTRFS Subvolume Layout

- Decrease swapfile size to 10G (don't really need hibernation)
- Remove extra BTRFS mount options like disarcd=async, space_cache=v2,
  and ssd
- Add a games subvolume
- Add a subvolume for /var/log
This commit is contained in:
Sravan Balaji
2024-03-30 08:15:50 -04:00
parent 7db963f519
commit 0cc1298285

View File

@@ -1,7 +1,7 @@
let
installDisk = "sda";
bootPartitionSize = "512M";
swapfileSize = "34G";
swapfileSize = "10G";
in {
disko.devices = {
disk = {
@@ -37,26 +37,34 @@ in {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"@" = {
"@root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" ];
};
"@home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" ];
};
"@.snapshots" = {
mountpoint = "/.snapshots";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
"@games" = {
mountpoint = "/games";
mountOptions = [ "compress=zstd" "noatime" ];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "discard=async" "space_cache=v2" "ssd" ];
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" ];
};
};
};
};