From bf227785854c9fd4a14c20db12dd6d3ebaf02981 Mon Sep 17 00:00:00 2001 From: Kazutoshi Noguchi Date: Tue, 6 Jul 2021 17:12:28 +0900 Subject: [PATCH] nixos/binfmt: run binfmt activation script after mounting /run binfmt activation script creates /run/binfmt before mounting /run when system activation. To fix it I added dependency to specialfs to binfmt activation script. --- nixos/modules/system/boot/binfmt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index cbdf581d73a..2408ecc80d2 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -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)} '';