flake/modules: return manpage package as a singleton

This commit is contained in:
raf 2024-04-21 00:10:00 +03:00
parent 8ca0760b01
commit 25dc887a8e
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ packages: inputs: {
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf;
inherit (lib.lists) optionals;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
@ -81,7 +81,7 @@ in {
sessionVariables = mkIf cfg.defaultEditor {EDITOR = "nvim";};
packages =
[cfg.finalPackage]
++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
};
};
}

View file

@ -7,7 +7,7 @@ packages: inputs: {
}: let
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkOverride;
inherit (lib.lists) optionals;
inherit (lib.lists) optional;
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) attrsOf anything bool;
@ -81,7 +81,7 @@ in {
variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");
systemPackages =
[cfg.finalPackage]
++ optionals cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
++ optional cfg.enableManpages packages.${pkgs.stdenv.system}.docs-manpages;
};
};
}