man: use cfg when possible

This commit is contained in:
Robert Helgesson 2023-04-03 21:09:31 +02:00
parent 6c76fb5b12
commit ccf650bb5b
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -46,12 +46,12 @@ in {
};
};
config = mkIf config.programs.man.enable {
config = mkIf cfg.enable {
home.packages = [ cfg.package ];
home.extraOutputsToInstall = [ "man" ];
# This is mostly copy/pasted/adapted from NixOS' documentation.nix.
home.file = mkIf config.programs.man.generateCaches {
home.file = mkIf cfg.generateCaches {
".manpath".text = let
# Generate a directory containing installed packages' manpages.
manualPages = pkgs.buildEnv {