diff --git a/nixos/nix/cross-compiling.nix b/nixos/nix/cross-compiling.nix index 61fdd3b6..42252638 100644 --- a/nixos/nix/cross-compiling.nix +++ b/nixos/nix/cross-compiling.nix @@ -9,7 +9,7 @@ in emulatedSystems = lib.mkOption { description = "List of systems to emulate via QEMU"; type = lib.types.listOf lib.types.str; - default = [ "aarch64-linux" ]; + default = lib.optionals (!config.nixos.desktop.tailscale.enable) [ "aarch64-linux" ]; }; }; @@ -17,7 +17,7 @@ in # Allow compilation of packages ARM/ARM64 architectures via QEMU # e.g. nix-build -A --argstr system aarch64-linux # https://nixos.wiki/wiki/NixOS_on_ARM#Compiling_through_QEMU - boot.binfmt = { + boot.binfmt = lib.mkIf (cfg.emulatedSystems != [ ]) { inherit (cfg) emulatedSystems; };