about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorArian van Putten <arian.vanputten@gmail.com>2024-03-12 18:24:53 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2024-03-13 22:20:47 +0100
commitb80fcf0e8fc3dd8cd8d34e7d7e954ede0db70831 (patch)
treecb04ca8dd619f1634888a14d82e5faf82f35d59d /nixos/modules
parent71848381c391fc4f8edee4d1a72f235504185c99 (diff)
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

(cherry picked from commit 16526f454fe534a809b3a0e4713c7fa70accb812)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/system/boot/binfmt.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix
index d16152ab9dec5..e365b78057fd5 100644
--- a/nixos/modules/system/boot/binfmt.nix
+++ b/nixos/modules/system/boot/binfmt.nix
@@ -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) ];
       })
     ];