mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 17:29:30 +08:00
modules.system.fileSystems.nfs: fix read-only NFS unmounting
This commit is contained in:
@@ -38,6 +38,15 @@
|
|||||||
];
|
];
|
||||||
})
|
})
|
||||||
nfs;
|
nfs;
|
||||||
|
systemd.mounts = builtins.map
|
||||||
|
(mount:
|
||||||
|
{
|
||||||
|
where = mount.value.mountPoint or mount.value;
|
||||||
|
what = mount.name;
|
||||||
|
overrideStrategy = "asDropin";
|
||||||
|
mountConfig.ForceUnmount = true;
|
||||||
|
})
|
||||||
|
(builtins.filter (mount: mount.value.readOnly or false) (lib.attrsToList nfs));
|
||||||
services.rpcbind.enable = true;
|
services.rpcbind.enable = true;
|
||||||
}
|
}
|
||||||
(lib.mkIf (builtins.any (mount: mount.mountBeforeSwitch or true) (builtins.attrValues nfs))
|
(lib.mkIf (builtins.any (mount: mount.mountBeforeSwitch or true) (builtins.attrValues nfs))
|
||||||
|
|||||||
Reference in New Issue
Block a user