diff options
Diffstat (limited to 'hosts/vm/disko.nix')
| -rw-r--r-- | hosts/vm/disko.nix | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/hosts/vm/disko.nix b/hosts/vm/disko.nix new file mode 100644 index 0000000..edc4008 --- /dev/null +++ b/hosts/vm/disko.nix @@ -0,0 +1,104 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "2G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@games" = { + mountpoint = "/games"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@llms" = { + mountpoint = "/llms"; + mountOptions = [ "nodatacow" "noatime"]; + }; + "@vms" = { + mountpoint = "/vms"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + media = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + media = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@archive" = { + mountpoint = "/media/archive"; + mountOptions = [ "compress=zstd:1" "autodefrag" "noatime" ]; + }; + "@movies" = { + mountpoint = "/media/movies"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@anime" = { + mountpoint = "/media/anime"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@pictures" = { + mountpoint = "/media/pics"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + "@videos" = { + mountpoint = "/media/vids"; + mountOptions = [ "autodefrag" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} |
