11.stylix/flake/packages.nix
Matt Sturgeon 47553c06fb
flake: rename packages.«system».docspackages.«system».doc
Use the new `perSystem.stylix.aliases` option to rename
`packages.«system».docs` and `apps.«system».docs` to `doc`.

The alias will be defined until 25.11 and will always warn when
evaluated.
2025-06-04 16:10:53 +01:00

35 lines
1 KiB
Nix

{ lib, inputs, ... }:
{
perSystem =
{ pkgs, config, ... }:
{
# Build all packages with 'nix flake check' instead of only verifying they
# are derivations.
checks = config.packages;
# Make 'nix run .#docs' serve the docs
apps.doc.program = config.packages.serve-docs;
packages = lib.mkMerge [
# Testbeds are virtual machines based on NixOS, therefore they are
# only available for Linux systems.
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux (
import ../stylix/testbed/default.nix {
inherit pkgs inputs lib;
}
))
{
doc = pkgs.callPackage ../doc {
inherit inputs;
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (inputs.home-manager.lib) homeManagerConfiguration;
};
serve-docs = pkgs.callPackage ../doc/server.nix {
inherit (config.packages) doc;
};
palette-generator = pkgs.callPackage ../palette-generator { };
}
];
};
}