mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
feh: Add package option (#3552)
Co-authored-by: Naïm Favier <n@monade.li> Co-authored-by: Sumner Evans <me@sumnerevans.com>
This commit is contained in:
parent
dd99675ee8
commit
c1a830c8fa
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,8 @@ in {
|
||||||
options.programs.feh = {
|
options.programs.feh = {
|
||||||
enable = mkEnableOption "feh - a fast and light image viewer";
|
enable = mkEnableOption "feh - a fast and light image viewer";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "feh" { };
|
||||||
|
|
||||||
buttons = mkOption {
|
buttons = mkOption {
|
||||||
default = { };
|
default = { };
|
||||||
type = with types; bindingsOf (either str int);
|
type = with types; bindingsOf (either str int);
|
||||||
|
@ -69,7 +71,7 @@ in {
|
||||||
"To disable a keybinding, use `null` instead of an empty string.";
|
"To disable a keybinding, use `null` instead of an empty string.";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
home.packages = [ pkgs.feh ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
xdg.configFile."feh/buttons" =
|
xdg.configFile."feh/buttons" =
|
||||||
mkIf (cfg.buttons != { }) { text = renderBindings cfg.buttons + "\n"; };
|
mkIf (cfg.buttons != { }) { text = renderBindings cfg.buttons + "\n"; };
|
||||||
|
|
Loading…
Reference in a new issue