diff options
author | MmeQuignon <matthieu@fwzte.xyz> | 2020-02-29 23:13:12 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-03-04 19:58:05 +0100 |
commit | 0a1ce53990e00adb3ec208d472b17f2511fcff33 (patch) | |
tree | 73fb2f318e09610e92067cd0bf56777a1ca7aa3e /modules/programs/abook.nix | |
parent | 2678fb3441f3db34e7f2017c78aa3f85f1e8c9f1 (diff) |
abook: add module
PR #1058
Diffstat (limited to 'modules/programs/abook.nix')
-rw-r--r-- | modules/programs/abook.nix | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/programs/abook.nix b/modules/programs/abook.nix new file mode 100644 index 00000000000..4ddc080ad51 --- /dev/null +++ b/modules/programs/abook.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.programs.abook; + +in { + options.programs.abook = { + enable = mkEnableOption "Abook"; + + extraConfig = mkOption { + type = types.lines; + default = ""; + example = '' + field pager = Pager + view CONTACT = name, email + set autosave=true + ''; + description = '' + Extra lines added to <filename>$HOME/.config/abook/abookrc</filename>. + Available configuration options are described in the abook repository: + <link xlink:href="https://sourceforge.net/p/abook/git/ci/master/tree/sample.abookrc" />. + ''; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.abook ]; + xdg.configFile."abook/abookrc" = mkIf (cfg.extraConfig != "") { + text = '' + # Generated by Home Manager. + # See http://abook.sourceforge.net/ + + ${cfg.extraConfig} + ''; + }; + }; +} |