From 881ab20ae5da9e8774ae24779696be9cd37caae4 Mon Sep 17 00:00:00 2001 From: Vegard Bieker Matthey Date: Sat, 21 Feb 2026 01:10:31 +0100 Subject: [PATCH] only cross compile when necessary --- flake.nix | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/flake.nix b/flake.nix index feb88af..e0b8416 100644 --- a/flake.nix +++ b/flake.nix @@ -106,20 +106,20 @@ }: let commonPkgsConfig = { - inherit localSystem crossSystem; - config.allowUnfreePredicate = - pkg: - builtins.elem (lib.getName pkg) [ + config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) + [ "nvidia-x11" "nvidia-settings" ]; - overlays = - (lib.optionals enableDefaults [ - # Global overlays go here - inputs.roowho2.overlays.default - ]) - ++ overlays; - }; + overlays = (lib.optionals enableDefaults [ + # Global overlays go here + inputs.roowho2.overlays.default + ]) ++ overlays; + } // (if localSystem != crossSystem then { + inherit localSystem crossSystem; + } else { + system = crossSystem; + }); pkgs = import nixpkgs commonPkgsConfig; unstablePkgs = import nixpkgs-unstable commonPkgsConfig;