mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
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:
1 parent
d9e12a2c7f
commit
fa7a23d0ef
1 file changed
+14
@@ -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);
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user