From 6f6ed14912a430125becf30527a1cdf35b4c314f Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 12 Jul 2024 21:13:22 +0900 Subject: [PATCH] Testing --- nixos/hosts/warsaw-ovh-01/disks.nix | 131 ++++++++++++++-------------- 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/nixos/hosts/warsaw-ovh-01/disks.nix b/nixos/hosts/warsaw-ovh-01/disks.nix index b20bece2..733356fd 100644 --- a/nixos/hosts/warsaw-ovh-01/disks.nix +++ b/nixos/hosts/warsaw-ovh-01/disks.nix @@ -67,74 +67,73 @@ }; }; }; - - mdadm = { - boot = { - type = "mdadm"; - level = 1; - metadata = "1.0"; - content = { - type = "Filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; + }; + mdadm = { + boot = { + type = "mdadm"; + level = 1; + metadata = "1.0"; + content = { + type = "Filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; }; - raid1 = { - type = "mdadm"; - level = 1; - content = { - type = "gpt"; - partitions = { - LUKS-ROOT = { - start = "550MiB"; - end = "100%"; + }; + raid1 = { + type = "mdadm"; + level = 1; + content = { + type = "gpt"; + partitions = { + LUKS-ROOT = { + start = "550MiB"; + end = "100%"; + content = { + type = "luks"; + name = "ROOT"; + extraOpenArgs = [ "--allow-discards" ]; content = { - type = "luks"; - name = "ROOT"; - extraOpenArgs = [ "--allow-discards" ]; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # root - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # home - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # nix - "/Storage" = { - mountpoint = "/Storage"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # Storage - # SNAPSHOT SUBVOLS - "/root/.snapshots" = { - mountpoint = "/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # root - "/home/.snapshots" = { - mountpoint = "/home/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # home - "/nix/.snapshots" = { - mountpoint = "/nix/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # nix - "/Storage/.snapshots" = { - mountpoint = "/Storage/.snapshots"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; # Storage - }; # subvolumes - }; # content.content - }; # content - }; # partition 2 (/ BTRFS) - }; + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # root + "/home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # home + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # nix + "/Storage" = { + mountpoint = "/Storage"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # Storage + # SNAPSHOT SUBVOLS + "/root/.snapshots" = { + mountpoint = "/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # root + "/home/.snapshots" = { + mountpoint = "/home/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # home + "/nix/.snapshots" = { + mountpoint = "/nix/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # nix + "/Storage/.snapshots" = { + mountpoint = "/Storage/.snapshots"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; # Storage + }; # subvolumes + }; # content.content + }; # content + }; # partition 2 (/ BTRFS) }; }; };