From f5aef0b4d2c7a1c69682311d551df6005cd0480a Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Thu, 1 Feb 2024 23:34:31 -0700 Subject: [PATCH] flake: make systems overrideable --- flake.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 5fc1689..289e2a4 100644 --- a/flake.nix +++ b/flake.nix @@ -3,22 +3,19 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + systems.url = "github:nix-systems/default"; alejandra.url = "github:kamadorueda/alejandra"; }; - outputs = inputs @ { + outputs = { self, nixpkgs, + systems, alejandra, }: let inherit (nixpkgs.lib) genAttrs; forAllSystems = f: - genAttrs [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-linux" - "aarch64-darwin" - ] (system: f nixpkgs.legacyPackages.${system}); + genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); in { packages = forAllSystems (pkgs: with pkgs; {