sane.fs: simplify
This commit is contained in:
@@ -146,6 +146,8 @@ let
|
||||
mkMountConfig = path: opt: let
|
||||
fsEntry = config.fileSystems."${path}";
|
||||
in {
|
||||
# create the mount point, with desired acl
|
||||
systemd.tmpfiles.settings."00-10-sane-fs"."${path}".d = opt.generated.acl;
|
||||
fileSystems."${path}" = {
|
||||
device = opt.mount.bind;
|
||||
options = [
|
||||
@@ -184,14 +186,10 @@ let
|
||||
|
||||
|
||||
mkFsConfig = path: opt: lib.mkMerge (
|
||||
[{
|
||||
# satisfy mkTypedMerge
|
||||
systemd.tmpfiles.settings."00-10-sane-fs" = {};
|
||||
}]
|
||||
++ 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)
|
||||
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.
|
||||
|
Reference in New Issue
Block a user