rofi: add package option

Add option to specify which package provides the rofi binary.

PR #1225
This commit is contained in:
Samuel Grahn 2020-05-11 17:42:59 +02:00 committed by Robert Helgesson
parent 4ae188bfc7
commit 1ec45b11ab
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -131,6 +131,17 @@ in {
enable = mkEnableOption enable = mkEnableOption
"Rofi: A window switcher, application launcher and dmenu replacement"; "Rofi: A window switcher, application launcher and dmenu replacement";
package = mkOption {
default = pkgs.rofi;
type = types.package;
description = ''
Package providing the <command>rofi</command> binary.
'';
example = literalExample ''
pkgs.rofi.override { plugins = [ pkgs.rofi-emoji ]; };
'';
};
width = mkOption { width = mkOption {
default = null; default = null;
type = types.nullOr types.int; type = types.nullOr types.int;
@ -295,7 +306,7 @@ in {
''; '';
}]; }];
home.packages = [ pkgs.rofi ]; home.packages = [ cfg.package ];
home.file."${cfg.configPath}".text = '' home.file."${cfg.configPath}".text = ''
${setOption "width" cfg.width} ${setOption "width" cfg.width}