From b6affe8d57795e7669466c2fa19bc7c18514eade Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sat, 17 Feb 2018 09:39:31 +0100 Subject: [PATCH] pidgin: add module (cherry picked from commit 4745c7a00dbef714dae0a399a5b33ed04983b21c) --- modules/misc/news.nix | 7 +++++++ modules/modules.nix | 1 + modules/programs/pidgin.nix | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 modules/programs/pidgin.nix diff --git a/modules/misc/news.nix b/modules/misc/news.nix index fada8e74..abac8323 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -560,6 +560,13 @@ in feature is slowly forthcoming. ''; } + + { + time = "2018-02-19T21:45:26+00:00"; + message = '' + A new module is available: 'programs.pidgin' + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index 7e9e6dae..3b5f705a 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -39,6 +39,7 @@ let ./programs/man.nix ./programs/mercurial.nix ./programs/neovim.nix + ./programs/pidgin.nix ./programs/rofi.nix ./programs/ssh.nix ./programs/termite.nix diff --git a/modules/programs/pidgin.nix b/modules/programs/pidgin.nix new file mode 100644 index 00000000..534ee5f0 --- /dev/null +++ b/modules/programs/pidgin.nix @@ -0,0 +1,36 @@ +{ 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 = "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; }) ]; + }; +}