From 0d347c56f6f41de822a4f4c7ff5072f3382db121 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Thu, 12 May 2022 18:28:05 +0200 Subject: [PATCH] use defaultSystems in simpleFlake.nix Keep the list of systems in sync by passing the list around. Fixes #54 --- default.nix | 2 +- simpleFlake.nix | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 9fa27c0..6239f70 100644 --- a/default.nix +++ b/default.nix @@ -178,7 +178,7 @@ let }; # This function tries to capture a common flake pattern. - simpleFlake = import ./simpleFlake.nix { inherit lib; }; + simpleFlake = import ./simpleFlake.nix { inherit lib defaultSystems; }; # Helper functions for Nix evaluation check-utils = import ./check-utils.nix; diff --git a/simpleFlake.nix b/simpleFlake.nix index 19a1a40..3736356 100644 --- a/simpleFlake.nix +++ b/simpleFlake.nix @@ -1,4 +1,6 @@ -{ lib }: +{ lib +, defaultSystems ? [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] +}: # This function returns a flake outputs-compatible schema. { # pass an instance of self @@ -18,7 +20,7 @@ , # maps to the devShell output. Pass in a shell.nix file or function. shell ? null , # pass the list of supported systems - systems ? [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] + systems ? defaultSystems }: let loadOverlay = obj: