Merge pull request #132536 from NixOS/backport-129413-to-release-21.05

[Backport release-21.05] nixos/binfmt: run binfmt activation script after mounting /run
This commit is contained in:
Jörg Thalheim 2021-08-03 17:35:01 +01:00 committed by GitHub
commit 51cfc3c6db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkOption types optionalString;
inherit (lib) mkOption types optionalString stringAfter;
cfg = config.boot.binfmt;
@ -270,7 +270,7 @@ in {
environment.etc."binfmt.d/nixos.conf".source = builtins.toFile "binfmt_nixos.conf"
(lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine config.boot.binfmt.registrations));
system.activationScripts.binfmt = ''
system.activationScripts.binfmt = stringAfter [ "specialfs" ] ''
mkdir -p -m 0755 /run/binfmt
${lib.concatStringsSep "\n" (lib.mapAttrsToList activationSnippet config.boot.binfmt.registrations)}
'';