diff options
| author | adikro <adikro@disroot.org> | 2026-03-01 19:57:16 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-03-01 19:57:16 +0100 |
| commit | 1be09af058424219de2aad4b9cc27ccf760d23f6 (patch) | |
| tree | bdc1177b166e1eef36763984b6862d7755a7bde8 /hosts/oci/disko.nix | |
| parent | 4b41ce640c5eddcb50904331e03aac5460caa144 (diff) | |
...
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" + ]; + }; + }; + }; + }; + }; + }; + }; +} |
