diff --git a/curacao/disko.nix b/curacao/disko.nix index a230302..e960fab 100644 --- a/curacao/disko.nix +++ b/curacao/disko.nix @@ -3,29 +3,39 @@ # TODO Not relatime everywhere, thank you # TODO Default options let - btrfs_args_hdd = [ + btrfs_args_ssd = [ "rw" "relatime" "compress=zstd:3" "space_cache" + "ssd" ]; - btrfs_args_ssd = btrfs_args_hdd ++ [ "ssd" ]; passwordFile = "/tmp/dotfiles_${config.networking.hostName}_password"; in { - boot.loader.efi.efiSysMountPoint = config.disko.devices.disk.razmo.content.partitions.esp.content.mountpoint; disko.devices = { disk = { razmo = { type = "disk"; - device = "/dev/disk/by-id/ata-ST1000LM048-2E7172_WKP8925H"; + device = "/dev/disk/by-id/ata-SDLF1DAR-960G-1HA1_A027C1A3"; content = { type = "gpt"; partitions = { + ESP = { + # Needs enough to store multiple kernel generations + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "defaults" + ]; + }; + }; swap = { - priority = 10; - start = "2048"; - size = "6G"; + size = "8G"; content = { type = "swap"; randomEncryption = true; @@ -36,78 +46,27 @@ in # Untranslated options from /etc/crypttab: swap,cipher=aes-xts-plain64,size=256 }; }; - nixosboot = { - priority = 15; - size = "2G"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - esp = { - priority = 20; - size = "128M"; - type = "EF00"; # EFI system partition - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/efi"; - mountOptions = [ - "rw" - "relatime" - "fmask=0022" - "dmask=0022" - "codepage=437" - "iocharset=iso8859-1" - "shortname=mixed" - "utf8" - "errors=remount-ro" - "noauto" - ]; - }; - }; - boot = { - priority = 30; - size = "128M"; - content = { - type = "luks"; - name = "boot"; - extraFormatArgs = [ "--type luks1" ]; - passwordFile = passwordFile; - settings = { - # keyFile = "/etc/keys/boot"; - }; - content = { - type = "filesystem"; - format = "ext2"; - mountpoint = "/mnt/old/boot"; - mountOptions = [ - "rw" - "relatime" - # "stripe=4" # For some reason doesn't work on NixOS - ]; - }; - }; - }; - main = { - priority = 40; + luks = { + size = "100%"; content = { type = "luks"; name = "razmo"; passwordFile = passwordFile; settings = { - # keyFile = "/etc/keys/razmo"; + allowDiscards = true; }; content = { type = "btrfs"; - # extraArgs = [ "-f" ]; + extraArgs = [ "-f" ]; mountpoint = "/mnt/razmo"; - mountOptions = btrfs_args_hdd; subvolumes = { "home.razmo" = { mountpoint = "/home.heavy"; - mountOptions = btrfs_args_hdd; + mountOptions = [ "compress=zstd" "relatime" ]; + }; + "steam" = { + mountpoint = "/opt/steam.razmo"; + mountOptions = [ "compress=zstd" "noatime" ]; }; }; };