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