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.
This commit is contained in:
Matt Sturgeon 2025-06-03 19:24:48 +01:00
parent 88c63899c7
commit 47553c06fb
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
4 changed files with 21 additions and 6 deletions

View file

@ -1,5 +1,5 @@
{
docs,
doc,
http-server,
writeShellApplication,
}:
@ -17,6 +17,6 @@ writeShellApplication {
"-o"
];
text = ''
http-server ${docs} "''${server_flags[@]}"
http-server ${doc} "''${server_flags[@]}"
'';
}

View file

@ -20,4 +20,19 @@
flake = lib.mkIf (!lib.oldestSupportedReleaseIsAtLeast 2605) {
homeManagerModules = builtins.warn "stylix: flake output `homeManagerModules` has been renamed to `homeModules`" self.homeModules;
};
perSystem.stylix.aliases = [
{
output = "apps";
old = "docs";
new = "doc";
until = 2511;
}
{
output = "packages";
old = "docs";
new = "doc";
until = 2511;
}
];
}

View file

@ -35,7 +35,7 @@
# not the local flake worktree that has possibly been modified since
# entering the devshell.
build-and-run-docs = pkgs.writeShellScriptBin "serve-docs" ''
nix run .#docs
nix run .#doc
'';
in
{

View file

@ -9,7 +9,7 @@
checks = config.packages;
# Make 'nix run .#docs' serve the docs
apps.docs.program = config.packages.serve-docs;
apps.doc.program = config.packages.serve-docs;
packages = lib.mkMerge [
# Testbeds are virtual machines based on NixOS, therefore they are
@ -20,13 +20,13 @@
}
))
{
docs = pkgs.callPackage ../doc {
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) docs;
inherit (config.packages) doc;
};
palette-generator = pkgs.callPackage ../palette-generator { };
}