diff --git a/nix/disko/tungsten/default.nix b/nix/disko/tungsten/default.nix new file mode 100644 index 00000000..b8a078eb --- /dev/null +++ b/nix/disko/tungsten/default.nix @@ -0,0 +1,90 @@ +# Adapted from: https://github.com/nix-community/disko/blob/master/example/luks-lvm.nix +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = throw "change me"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "500M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + extraOpenArgs = []; + settings = { + allowDiscards = true; + }; + content = { + type = "lvm_pv"; + vg = "pool"; + }; + }; + }; + }; + }; + }; + }; + lvm_vg = { + pool = { + type = "lvm_vg"; + lvs = { + root = { + size = "75G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + mountOptions = ["defaults"]; + }; + }; + nix = { + size = "200G"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/nix"; + mountOptions = ["noatime"]; + }; + }; + swap = { + size = "48G"; # > 32G for hibernation + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = true; + }; + }; + home = { + size = "100%FREE"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/home"; + }; + }; + }; + }; + }; + nodev = { + "/tmp" = { + fsType = "tmpfs"; + mountOptions = [ + "size=4G" + ]; + }; + }; + }; +}