From 1ff6f0eb48961e6482ec1b7d0dd9b606e85ddc79 Mon Sep 17 00:00:00 2001 From: adikro Date: Thu, 12 Feb 2026 00:41:07 +0100 Subject: disko and bootloader changes --- hosts/thinkpad/disko.nix | 150 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 142 insertions(+), 8 deletions(-) (limited to 'hosts/thinkpad/disko.nix') diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix index 97e5c87..31427d3 100644 --- a/hosts/thinkpad/disko.nix +++ b/hosts/thinkpad/disko.nix @@ -7,38 +7,56 @@ content = { type = "gpt"; partitions = { - biosboot = { + bootloader = { size = "1M"; type = "EF02"; }; + boot = { + size = "2G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; luks = { size = "100%"; content = { type = "luks"; - name = "crypted"; + name = "crypted_main"; settings.allowDiscards = true; content = { type = "btrfs"; - extraArgs = ["-f"]; + extraArgs = [ "-f" ]; subvolumes = { "root" = { mountpoint = "/"; mountOptions = [ "compress=zstd:1" + "space_cache=v2" + "discard=async" "noatime" ]; }; - "home" = { - mountpoint = "/home"; + "nix" = { + mountpoint = "/nix"; mountOptions = [ "compress=zstd:1" + "space_cache=v2" + "discard=async" + "nodev" "noatime" ]; }; - "nix" = { - mountpoint = "/nix"; + "home" = { + mountpoint = "/home"; mountOptions = [ "compress=zstd:1" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" "noatime" ]; }; @@ -46,21 +64,43 @@ mountpoint = "/var/log"; mountOptions = [ "compress=zstd:1" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + ]; + }; + "games" = { + mountpoint = "/games"; + mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" "noatime" ]; }; "vms" = { mountpoint = "/vms"; mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" "nodatacow" + "nosuid" + "nodev" "noatime" ]; }; "swap" = { mountpoint = "/.swapvol"; mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" "nodatacow" - "compress=no" "noatime" ]; }; @@ -71,6 +111,100 @@ }; }; }; + storage = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted_storage"; + keyFile = "/tmp/storage.key"; + settings.allowDiscards = true; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "archive" = { + mountpoint = "/storage/archive"; + mountOptions = [ + "compress=zstd:1" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + + "nofail" + "x-systemd.device-timeout=5s" + ]; + }; + "movies" = { + mountpoint = "/storage/movies"; + mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + + "nofail" + "x-systemd.device-timeout=5s" + ]; + }; + "anime" = { + mountpoint = "/storage/anime"; + mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + + "nofail" + "x-systemd.device-timeout=5s" + ]; + }; + "pictures" = { + mountpoint = "/storage/pics"; + mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + + "nofail" + "x-systemd.device-timeout=5s" + ]; + }; + "videos" = { + mountpoint = "/storage/vids"; + mountOptions = [ + "compress=none" + "space_cache=v2" + "discard=async" + "nosuid" + "nodev" + "noatime" + + "nofail" + "x-systemd.device-timeout=5s" + ]; + }; + }; + }; + }; + }; + }; + }; + }; }; }; } -- cgit v1.3