Skip to content

Commit

Permalink
stylix: move testbeds to packages
Browse files Browse the repository at this point in the history
This allows usage with `nix run` without having to specify the current architecture.
  • Loading branch information
danth committed Apr 11, 2024
1 parent 044bdd5 commit f4429a6
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,20 @@
"x86_64-linux"
] (
system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
docs = import ./docs {
inherit pkgs inputs;
inherit (nixpkgs) lib;
};
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};

palette-generator = pkgs.callPackage ./palette-generator { };
}
);
universalPackages = {
docs = import ./docs { inherit pkgs inputs lib; };
palette-generator = pkgs.callPackage ./palette-generator { };
};

checks = nixpkgs.lib.genAttrs [
"aarch64-linux"
"i686-linux"
"x86_64-linux"
] (
system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./stylix/testbed.nix {
inherit pkgs inputs;
inherit (nixpkgs) lib;
}
testbedPackages = lib.optionalAttrs
(lib.hasSuffix "-linux" system)
(import ./stylix/testbed.nix { inherit pkgs inputs lib; });
in
universalPackages // testbedPackages
);

nixosModules.stylix = { pkgs, ... }@args: {
Expand Down

0 comments on commit f4429a6

Please sign in to comment.