From 5495a14eb6e821e8ad88fadfffda5bb624b93553 Mon Sep 17 00:00:00 2001 From: chn Date: Mon, 10 Jul 2023 14:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=B8=80=E4=BA=9B=E9=80=89?= =?UTF-8?q?=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/boot/fileSystems.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/boot/fileSystems.nix b/modules/boot/fileSystems.nix index f6d2000b..fc3941f8 100644 --- a/modules/boot/fileSystems.nix +++ b/modules/boot/fileSystems.nix @@ -5,16 +5,20 @@ inputs: mount = { # device = mountPoint; - vfat = mkOption { type = types.attrsOf types.str; }; + vfat = mkOption { type = types.attrsOf types.nonEmptyStr; }; # device.subvol = mountPoint; - btrfs = mkOption { type = types.attrsOf (types.attrsOf types.str); }; + btrfs = mkOption { type = types.attrsOf (types.attrsOf types.nonEmptyStr); }; }; - decrypt.auto = mkOption { type = types.nullOr (types.attrsOf (types.submodule { options = - { mapper = mkOption { type = types.nonEmptyStr; }; ssd = mkOption { type = types.bool; }; }; })); }; + decrypt.auto = mkOption { type = types.attrsOf (types.submodule { options = + { + mapper = mkOption { type = types.nonEmptyStr; }; + ssd = mkOption { type = types.bool; default = false; }; + }; }); }; mdadm = mkOption { type = types.nullOr types.str; }; swap = mkOption { type = types.listOf types.nonEmptyStr; }; resume = mkOption { type = types.nullOr (types.str or (types.submodule { options = { device = mkOption { type = types.nonEmptyStr; }; offset = mkOption { type = types.ints.unsigned; }; }; })); }; + # cleanRootfs = mkOption { type = types.nullOr # swap and resume # swap != resume.device if swap is a file