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 {