From 9e5f99b718ff9fa15146646c5a7d8cec14bcb9b9 Mon Sep 17 00:00:00 2001 From: satr14 Date: Sun, 29 Mar 2026 11:30:08 +0700 Subject: [PATCH] fix fstype --- lib/options.nix | 12 ++++++------ modules/hardware/misc/disks.nix | 6 +----- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/options.nix b/lib/options.nix index aa12642..a421e5c 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -2,8 +2,8 @@ let d = dest: { inherit dest; auth = false; }; da = dest: { inherit dest; auth = true; }; - o = path: { inherit path; required = false; }; - r = path: { inherit path; required = true; }; + ext4 = path: { inherit path; type = "ext4"; }; + btrfs = path: { inherit path; type = "btrfs"; }; in { flake-path = "~/Projects/nix-flake"; # set this to the cloned repo path @@ -27,10 +27,10 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJtdH1YqRH9xhuHMivezLvj/hpH77yfH3HUCaRboB/hb forgejo-deploy-runner" ]; disks = { - share = o "/dev/disk/by-uuid/f1ee1d17-e852-4e02-ae86-eaf6116a2aeb"; # disk for file share and storage - gallery = r "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery - data = r "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data - host = r "/dev/disk/by-uuid/968f14a4-631e-4325-8cd1-f9aec0da9e4d"; # disk for media collection (named host for backwards compatibility) + share = btrfs "/dev/disk/by-uuid/f1ee1d17-e852-4e02-ae86-eaf6116a2aeb"; # disk for file share and storage + gallery = ext4 "/dev/disk/by-uuid/834f51c1-90ee-4601-ba76-ef0419198d67"; # disk for photo gallery + data = ext4 "/dev/disk/by-uuid/a5752dd6-092d-484c-969c-2fdc7cb4a5f0"; # disk for app data + host = ext4 "/dev/disk/by-uuid/968f14a4-631e-4325-8cd1-f9aec0da9e4d"; # disk for media collection (named host for backwards compatibility) }; dash = [ [ "PocketID" "authentik" "https://auth.${domain}" "http://localhost:1411/" ] diff --git a/modules/hardware/misc/disks.nix b/modules/hardware/misc/disks.nix index 0988ea9..b874ff7 100644 --- a/modules/hardware/misc/disks.nix +++ b/modules/hardware/misc/disks.nix @@ -1,6 +1,5 @@ { lib, homelab, ... }: let globalOpts = { - fsType = "ext4"; autoFormat = true; autoResize = true; }; @@ -10,10 +9,7 @@ in { } // lib.mapAttrs' (name: dev: lib.nameValuePair "/mnt/${name}" (globalOpts // { device = dev.path; - options = if dev.required == false then [ - "nofail" - "x-systemd.automount" - ] else [ "defaults" ]; + fsType = dev.type; }) ) homelab.disks; } \ No newline at end of file