Skip to content

Commit

Permalink
Merge pull request #215188 from ElvishJerricco/binfmt-bad-setting-fix
Browse files Browse the repository at this point in the history
binfmt: Don't create invalid service with no registrations
  • Loading branch information
flokli authored Feb 18, 2023
2 parents b4e9968 + b3a27af commit 4bfb641
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions nixos/modules/system/boot/binfmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,13 @@ in {
mkdir -p -m 0755 /run/binfmt
${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet config.boot.binfmt.registrations)}
'';
systemd.additionalUpstreamSystemUnits = lib.mkIf (config.boot.binfmt.registrations != {}) [
"proc-sys-fs-binfmt_misc.automount"
"proc-sys-fs-binfmt_misc.mount"
"systemd-binfmt.service"
];
systemd.services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
systemd = lib.mkIf (config.boot.binfmt.registrations != {}) {
additionalUpstreamSystemUnits = [
"proc-sys-fs-binfmt_misc.automount"
"proc-sys-fs-binfmt_misc.mount"
"systemd-binfmt.service"
];
services.systemd-binfmt.restartTriggers = [ (builtins.toJSON config.boot.binfmt.registrations) ];
};
};
}

0 comments on commit 4bfb641

Please sign in to comment.