1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-20 10:09:45 +01: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:
Wiseh 2023-01-02 14:36:23 -05:00 committed by GitHub
parent dd99675ee8
commit c1a830c8fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"; };