From 6975866817064eb2edab6825b4905ca7500cf813 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 25 Jan 2026 17:01:14 +0100 Subject: pendrive setup --- hosts/vm/disko.nix | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 hosts/vm/disko.nix (limited to 'hosts/vm/disko.nix') 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" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} -- cgit v1.3