From 1cd51d203487c0a93638fba39981bd1a3a6fd519 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Wed, 20 Dec 2023 14:02:15 +0100 Subject: [PATCH] disko: fix labels and config --- disko/btrfs.nix | 66 ++++++++++++++++++++------------------------ disko/btrfs_luks.nix | 17 +++++++----- 2 files changed, 40 insertions(+), 43 deletions(-) diff --git a/disko/btrfs.nix b/disko/btrfs.nix index 4dbc90a..1199250 100644 --- a/disko/btrfs.nix +++ b/disko/btrfs.nix @@ -12,8 +12,8 @@ type = "EF00"; content = { type = "filesystem"; - name = "NIXBOOT"; format = "vfat"; + extraArgs = [ "-n NIXBOOT" ]; mountpoint = "/boot"; mountOptions = [ "defaults" @@ -24,41 +24,35 @@ size = "100%"; content = { type = "btrfs"; - name = "NIXROOT"; - # disable settings.keyFile if you want to use interactive password entry - #passwordFile = "/tmp/secret.key"; # Interactive - settings = { - allowDiscards = true; - #keyFile = "/tmp/secret.key"; - }; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "@" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; - "@srv" = { - mountpoint = "/srv"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; - "@var" = { - mountpoint = "/var"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; - "@swap" = { - mountpoint = "/swap"; - swap.swapfile.size = "8G"; - }; + extraArgs = [ "-f -L NIXROOT" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@snapshots" = { + mountpoint = "/mnt"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@srv" = { + mountpoint = "/srv"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@var" = { + mountpoint = "/var"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@swap" = { + mountpoint = "/swap"; + swap.swapfile.size = "8G"; }; }; }; diff --git a/disko/btrfs_luks.nix b/disko/btrfs_luks.nix index 13c04e3..876d5e3 100644 --- a/disko/btrfs_luks.nix +++ b/disko/btrfs_luks.nix @@ -12,8 +12,8 @@ type = "EF00"; content = { type = "filesystem"; - name = "NIXBOOT"; format = "vfat"; + extraArgs = [ "-n NIXBOOT" ]; mountpoint = "/boot"; mountOptions = [ "defaults" @@ -33,8 +33,7 @@ }; content = { type = "btrfs"; - name = "NIXROOT"; - extraArgs = [ "-f" ]; + extraArgs = [ "-f -L NIXROOT" ]; subvolumes = { "@" = { mountpoint = "/"; @@ -44,14 +43,18 @@ mountpoint = "/home"; mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; }; - "@srv" = { - mountpoint = "/srv"; - mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; - }; "@nix" = { mountpoint = "/nix"; mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; }; + "@snapshots" = { + mountpoint = "/mnt"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; + "@srv" = { + mountpoint = "/srv"; + mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ]; + }; "@var" = { mountpoint = "/var"; mountOptions = [ "compress=zstd" "noatime" "ssd" "discard=async" ];