system.binfmt: only enable on workstation

This commit is contained in:
陈浩南 2024-04-21 09:49:45 +08:00
parent abb296f4eb
commit 0bdfca6de0
3 changed files with 1 additions and 3 deletions

View File

@ -18,7 +18,6 @@ inputs:
};
grub.installDevice = "efi";
networking = { hostname = "pcarm"; networkd = {}; };
binfmt.enable = false;
nixpkgs.arch = "aarch64";
kernel.variant = "nixos";
};

View File

@ -19,7 +19,6 @@ inputs:
};
grub.installDevice = "efi";
networking = { hostname = "pi3b"; networkd = {}; };
binfmt.enable = false;
nixpkgs.arch = "aarch64";
kernel.variant = "nixos";
};

View File

@ -2,7 +2,7 @@ inputs:
{
options.nixos.system.binfmt = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = true; };
enable = mkOption { type = types.bool; default = inputs.config.nixos.packages.packageSet == "workstation"; };
};
config = inputs.lib.mkIf inputs.config.nixos.system.binfmt.enable
{