nixos/modules/system/binfmt.nix

11 lines
394 B
Nix
Raw Normal View History

2024-03-05 15:35:31 +08:00
inputs:
{
2024-08-03 17:40:11 +08:00
options.nixos.system.binfmt = let inherit (inputs.lib) mkOption types; in mkOption
{ type = types.nullOr (types.submodule {}); default = {}; };
2024-08-03 17:40:11 +08:00
config = let inherit (inputs.config.nixos.system) binfmt; in inputs.lib.mkIf (binfmt != null)
2024-03-05 15:35:31 +08:00
{
programs.java = { enable = true; binfmt = true; };
boot.binfmt.emulatedSystems = [ "aarch64-linux" "x86_64-windows" ];
};
}