sane.fs: simplify
This commit is contained in:
@@ -146,6 +146,8 @@ let
|
|||||||
mkMountConfig = path: opt: let
|
mkMountConfig = path: opt: let
|
||||||
fsEntry = config.fileSystems."${path}";
|
fsEntry = config.fileSystems."${path}";
|
||||||
in {
|
in {
|
||||||
|
# create the mount point, with desired acl
|
||||||
|
systemd.tmpfiles.settings."00-10-sane-fs"."${path}".d = opt.generated.acl;
|
||||||
fileSystems."${path}" = {
|
fileSystems."${path}" = {
|
||||||
device = opt.mount.bind;
|
device = opt.mount.bind;
|
||||||
options = [
|
options = [
|
||||||
@@ -184,14 +186,10 @@ let
|
|||||||
|
|
||||||
|
|
||||||
mkFsConfig = path: opt: lib.mkMerge (
|
mkFsConfig = path: opt: lib.mkMerge (
|
||||||
[{
|
lib.optional (opt.mount != null) (mkMountConfig path opt)
|
||||||
# satisfy mkTypedMerge
|
++ lib.optional (opt.dir != null) (mkDirConfig path opt)
|
||||||
systemd.tmpfiles.settings."00-10-sane-fs" = {};
|
++ lib.optional (opt.file != null) (mkFileConfig path opt)
|
||||||
}]
|
++ lib.optional (opt.symlink != null) (mkSymlinkConfig path opt)
|
||||||
++ lib.optional (opt.mount != null) (mkMountConfig path opt)
|
|
||||||
++ lib.optional (opt.dir != null) (mkDirConfig path opt)
|
|
||||||
++ lib.optional (opt.file != null) (mkFileConfig path opt)
|
|
||||||
++ lib.optional (opt.symlink != null) (mkSymlinkConfig path opt)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
# return all ancestors of this path.
|
# return all ancestors of this path.
|
||||||
|
Reference in New Issue
Block a user