fzf: add package
option
This commit is contained in:
parent
4e86d65aee
commit
08fc1586c0
|
@ -10,6 +10,13 @@ in {
|
||||||
options.programs.fzf = {
|
options.programs.fzf = {
|
||||||
enable = mkEnableOption "fzf - a command-line fuzzy finder";
|
enable = mkEnableOption "fzf - a command-line fuzzy finder";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.fzf;
|
||||||
|
defaultText = literalExample "pkgs.fzf";
|
||||||
|
description = "Package providing the <command>fzf</command> tool.";
|
||||||
|
};
|
||||||
|
|
||||||
defaultCommand = mkOption {
|
defaultCommand = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
@ -111,7 +118,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = [ pkgs.fzf ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
home.sessionVariables = mapAttrs (n: v: toString v)
|
home.sessionVariables = mapAttrs (n: v: toString v)
|
||||||
(filterAttrs (n: v: v != [ ] && v != null) {
|
(filterAttrs (n: v: v != [ ] && v != null) {
|
||||||
|
|
Loading…
Reference in a new issue