From 672f28c75c1d1a4b0a36c1be925f8f9df1a6cc2e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 4 Jun 2025 12:57:36 +0300 Subject: [PATCH] hosts/dunamis/disko/disk-main.nix: refactor hosts/sarien/disko/default.nix: source dunamis/disko/disk-main.nix Signed-off-by: unexplrd --- hosts/dunamis/disko/disk-main.nix | 29 +++++++---------------------- hosts/sarien/disko/default.nix | 3 ++- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/hosts/dunamis/disko/disk-main.nix b/hosts/dunamis/disko/disk-main.nix index 9631489..c076947 100644 --- a/hosts/dunamis/disko/disk-main.nix +++ b/hosts/dunamis/disko/disk-main.nix @@ -28,42 +28,27 @@ name = "luks-main"; initrdUnlock = true; settings.allowDiscards = true; - content = { + content = let + mountOptions = ["autodefrag" "compress-force=zstd" "noatime"]; + in { type = "btrfs"; extraArgs = ["-f"]; subvolumes = { "@nixos-root" = { mountpoint = "/"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - "noexec" - ]; + mountOptions = mountOptions ++ ["noexec"]; }; "@home" = { mountpoint = "/home"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - ]; + inherit mountOptions; }; "@storage" = { mountpoint = "/storage"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - ]; + inherit mountOptions; }; "@nix" = { mountpoint = "/nix"; - mountOptions = [ - "autodefrag" - "compress-force=zstd" - "noatime" - ]; + inherit mountOptions; }; }; }; diff --git a/hosts/sarien/disko/default.nix b/hosts/sarien/disko/default.nix index b43f6ed..8468027 100644 --- a/hosts/sarien/disko/default.nix +++ b/hosts/sarien/disko/default.nix @@ -10,5 +10,6 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; + # same partitioning setup + disko.devices.disk.main = import ../../dunamis/disko/disk-main.nix {inherit disk;}; }