sane.fs: fix so my tmpfiles.d always runs before anything else (like e.g. /var/lib stuff)

This commit is contained in:
2024-09-30 05:42:24 +00:00
parent c71d2c846c
commit 6983dbe8c4

View File

@@ -326,15 +326,15 @@ let
}; };
mkDirConfig = path: opt: { mkDirConfig = path: opt: {
systemd.tmpfiles.settings."0010-sane-fs"."${path}".d = opt.generated.acl; systemd.tmpfiles.settings."00-10-sane-fs"."${path}".d = opt.generated.acl;
}; };
mkFileConfig = path: opt: { mkFileConfig = path: opt: {
systemd.tmpfiles.settings."0010-sane-fs"."${path}".C = opt.generated.acl // { systemd.tmpfiles.settings."00-10-sane-fs"."${path}".C = opt.generated.acl // {
argument = opt.file.copyFrom; argument = opt.file.copyFrom;
}; };
}; };
mkSymlinkConfig = path: opt: { mkSymlinkConfig = path: opt: {
systemd.tmpfiles.settings."0010-sane-fs"."${path}".L = opt.generated.acl // { systemd.tmpfiles.settings."00-10-sane-fs"."${path}".L = opt.generated.acl // {
argument = opt.symlink.target; argument = opt.symlink.target;
}; };
}; };
@@ -343,7 +343,7 @@ let
mkFsConfig = path: opt: lib.mkMerge ( mkFsConfig = path: opt: lib.mkMerge (
[{ [{
# satisfy mkTypedMerge # satisfy mkTypedMerge
systemd.tmpfiles.settings."0010-sane-fs" = {}; systemd.tmpfiles.settings."00-10-sane-fs" = {};
}] }]
++ [ (mkGeneratedConfig path opt) ] ++ [ (mkGeneratedConfig path opt) ]
++ lib.optional (opt.mount != null) (mkMountConfig path opt) ++ lib.optional (opt.mount != null) (mkMountConfig path opt)
@@ -407,7 +407,7 @@ in {
systemd.mounts = f.systemd.mounts; systemd.mounts = f.systemd.mounts;
systemd.services = f.systemd.services; systemd.services = f.systemd.services;
fileSystems = f.fileSystems; fileSystems = f.fileSystems;
systemd.tmpfiles.settings."0010-sane-fs" = f.systemd.tmpfiles.settings."0010-sane-fs"; systemd.tmpfiles.settings."00-10-sane-fs" = f.systemd.tmpfiles.settings."00-10-sane-fs";
}; };
in take (sane-lib.mkTypedMerge take configs); in take (sane-lib.mkTypedMerge take configs);
} }