Unverified Commit f0672fa7 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #129413 from ngkz/binfmt-order-fix

nixos/binfmt: run binfmt activation script after mounting /run
parents c0f55f9f bf227785
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
{ 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)}
    '';