From 77a65800e6b1389f7e0a90090297048720c99017 Mon Sep 17 00:00:00 2001 From: NAHO <90870942+trueNAHO@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:44:09 +0200 Subject: [PATCH] stylix: adopt flake-utils.lib.eachDefaultSystem Adopt the flake-utils.lib.eachDefaultSystem function for added features like '--impure' flag support [1]. [1]: https://github.com/numtide/flake-utils/pull/115 Link: https://github.com/danth/stylix/pull/515 --- flake.nix | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index a2f8587..d79c007 100644 --- a/flake.nix +++ b/flake.nix @@ -65,27 +65,27 @@ outputs = { nixpkgs, base16, self, ... }@inputs: - { - packages = nixpkgs.lib.genAttrs inputs.flake-utils.lib.defaultSystems ( - system: - let - inherit (nixpkgs) lib; - pkgs = nixpkgs.legacyPackages.${system}; - - universalPackages = { - docs = import ./docs { inherit pkgs inputs lib; }; - palette-generator = pkgs.callPackage ./palette-generator { }; - }; - - # Testbeds are virtual machines based on NixOS, therefore they are - # only available for Linux systems. - testbedPackages = lib.optionalAttrs - (lib.hasSuffix "-linux" system) - (import ./stylix/testbed.nix { inherit pkgs inputs lib; }); - in - universalPackages // testbedPackages - ); + inputs.flake-utils.lib.eachDefaultSystem ( + system: let + inherit (nixpkgs) lib; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages = let + universalPackages = { + docs = import ./docs { inherit pkgs inputs lib; }; + palette-generator = pkgs.callPackage ./palette-generator { }; + }; + # Testbeds are virtual machines based on NixOS, therefore they are + # only available for Linux systems. + testbedPackages = lib.optionalAttrs + (lib.hasSuffix "-linux" system) + (import ./stylix/testbed.nix { inherit pkgs inputs lib; }); + in + universalPackages // testbedPackages; + } + ) + // { nixosModules.stylix = { pkgs, ... }@args: { imports = [ (import ./stylix/nixos inputs {