Skip to content

Commit fa7a23d

Browse files
Bert-ProesmansMic92
authored andcommitted
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.
1 parent d9e12a2 commit fa7a23d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/types/nodev.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
rootMountPoint,
77
...
88
}:
9+
let
10+
# REF; nixos/modules/tasks/filesystems.nix
11+
specialFSTypes = [
12+
"proc"
13+
"sysfs"
14+
"tmpfs"
15+
"ramfs"
16+
"devtmpfs"
17+
"devpts"
18+
];
19+
in
920
{
1021
options = {
1122
type = lib.mkOption {
@@ -86,4 +97,7 @@
8697
description = "Packages";
8798
};
8899
};
100+
config = {
101+
device = lib.mkIf (lib.elem config.fsType specialFSTypes) (lib.mkDefault config.fsType);
102+
};
89103
}

0 commit comments

Comments
 (0)