Skip to content

Commit

Permalink
feh: Add package option (#3552)
Browse files Browse the repository at this point in the history
Co-authored-by: Naïm Favier <[email protected]>
Co-authored-by: Sumner Evans <[email protected]>
  • Loading branch information
3 people authored Jan 2, 2023
1 parent dd99675 commit c1a830c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/programs/feh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ in {
options.programs.feh = {
enable = mkEnableOption "feh - a fast and light image viewer";

package = mkPackageOption pkgs "feh" { };

buttons = mkOption {
default = { };
type = with types; bindingsOf (either str int);
Expand Down Expand Up @@ -69,7 +71,7 @@ in {
"To disable a keybinding, use `null` instead of an empty string.";
}];

home.packages = [ pkgs.feh ];
home.packages = [ cfg.package ];

xdg.configFile."feh/buttons" =
mkIf (cfg.buttons != { }) { text = renderBindings cfg.buttons + "\n"; };
Expand Down

0 comments on commit c1a830c

Please sign in to comment.