aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/pidgin.nix
blob: a375fd1b2bd9269e4d8d19ef6792053aa63b3c14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ config, lib, pkgs, ... }:

with lib;

let

  cfg = config.programs.pidgin;

in {
  meta.maintainers = [ maintainers.rycee ];

  options = {
    programs.pidgin = {
      enable = mkEnableOption "Pidgin messaging client";

      package = mkOption {
        type = types.package;
        default = pkgs.pidgin;
        defaultText = literalExample "pkgs.pidgin";
        description = "The Pidgin package to use.";
      };

      plugins = mkOption {
        default = [ ];
        example = literalExample "[ pkgs.pidgin-otr pkgs.pidgin-osd ]";
        description = "Plugins that should be available to Pidgin.";
      };
    };
  };

  config = mkIf cfg.enable {
    home.packages = [ (cfg.package.override { inherit (cfg) plugins; }) ];
  };
}