fix(nodev); Set device default to fstype config

The value for device is copied into the SOURCE column of findmnt.
By default this is "none". The mount and unmount scripts
branch on SOURCE=fsType specifically, and the existence of "none"
in the SOURCE column causes wrong branches to be executed.
For a list of special filesystems, the default value "none"
is replaced by the value for fsType.
This commit is contained in:
Bert Proesmans authored and Jörg Thalheim committed 2025-11-20 14:10:46 +00:00
1 parent d9e12a2c7f
commit fa7a23d0ef
1 file changed
+14
+14
View File
@@ -6,6 +6,17 @@
rootMountPoint,
...
}:
let
# REF; nixos/modules/tasks/filesystems.nix
specialFSTypes = [
"proc"
"sysfs"
"tmpfs"
"ramfs"
"devtmpfs"
"devpts"
];
in
{
options = {
type = lib.mkOption {
@@ -86,4 +97,7 @@
description = "Packages";
};
};
config = {
device = lib.mkIf (lib.elem config.fsType specialFSTypes) (lib.mkDefault config.fsType);
};
}