nixos/binfmt: fix race condition between systemd-tmpfiles and systemd-binfmt

We need to make sure systemd-tmpfiles-setup.service ran before we
start systemd-binft.service. Otherwise it might fail to start
due to non-existant files

Fixes #295365
This commit is contained in:
Arian van Putten 2024-03-12 18:24:53 +01:00
parent 43683b205c
commit 16526f454f

View File

@ -331,6 +331,7 @@ in {
"proc-sys-fs-binfmt_misc.mount"
"systemd-binfmt.service"
];
services.systemd-binfmt.after = [ "systemd-tmpfiles-setup.service" ];
services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
})
];