htop: add package option (#2407)

This commit is contained in:
Thiago Kenji Okada 2021-10-20 12:22:17 -03:00 committed by GitHub
parent b5d738b5a3
commit 91155a98ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -136,6 +136,13 @@ in {
<filename>~/.config/htop/htoprc</filename>.
'';
};
package = mkOption {
type = types.package;
default = pkgs.htop;
defaultText = literalExpression "pkgs.htop";
description = "Package containing the <command>htop</command> program.";
};
};
config = mkIf cfg.enable {
@ -143,7 +150,7 @@ in {
inherit fields modes leftMeters rightMeters bar text graph led blank;
};
home.packages = [ pkgs.htop ];
home.packages = [ cfg.package ];
xdg.configFile."htop/htoprc" = let
defaults = {