diff options
Diffstat (limited to 'hosts/oci/disko.nix')
| -rw-r--r-- | hosts/oci/disko.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/hosts/oci/disko.nix b/hosts/oci/disko.nix new file mode 100644 index 0000000..fb01384 --- /dev/null +++ b/hosts/oci/disko.nix @@ -0,0 +1,77 @@ +{ lib, ... }: +{ + disko.devices.disk.main = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = lib.mkForce "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "root" = { + mountpoint = lib.mkForce "/"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "noatime" + ]; + }; + "nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nodev" + "noatime" + ]; + }; + "home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; + "log" = { + mountpoint = "/var/log"; + mountOptions = [ + "compress=zstd:1" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; + "swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ + "compress=none" + "discard=async" + "nodatacow" + "noatime" + ]; + }; + }; + }; + }; + }; + }; + }; +} |
