From 8b4fd7478261c464632a0e99e5b3c1ae836a4768 Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Sat, 24 Dec 2022 13:34:54 -0500 Subject: [PATCH] nixos/filesystems: require fstab options list be non-empty When the option list is empty, the fstab generator does not automatically add "defaults" and generates a non-working fstab (since it just emits two spaces around where the options would have been which is only technically one fstab separator). --- nixos/modules/tasks/filesystems.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index a093baea6a65..7f2c8a41b20a 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -54,7 +54,7 @@ let default = [ "defaults" ]; example = [ "data=journal" ]; description = lib.mdDoc "Options used to mount the file system."; - type = types.listOf nonEmptyStr; + type = types.nonEmptyListOf nonEmptyStr; }; depends = mkOption {