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
This commit is contained in:
NAHO 2024-08-20 14:44:09 +02:00
parent ab67c50983
commit 77a65800e6
No known key found for this signature in database
GPG key ID: 229CB671D09B95F5

View file

@ -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 {