fork/home-manager
git clone https://git.julia.blue/fork/home-manager
75790441
master
1{ config , lib , pkgs , ...} : 2 3with lib ; 4 5let 6 7cfg = config . programs . abook ; 8 9in { 10options . programs . abook = { 11enable = mkEnableOption "Abook" ; 12 13extraConfig = mkOption { 14type = types . lines ; 15default = "" ; 16example = '' 17field pager = Pager 18view CONTACT = name, email 19set autosave=true 20'' ; 21description = '' 22Extra lines added to {file}`$HOME/.config/abook/abookrc`. 23Available configuration options are described in the abook repository: 24<https://sourceforge.net/p/abook/git/ci/master/tree/sample.abookrc>. 25'' ; 26}; 27}; 28 29config = mkIf cfg . enable { 30assertions = 31[ ( hm . assertions . assertPlatform "programs.abook" pkgs platforms . linux ) ]; 32 33home . packages = [ pkgs . abook ]; 34 35xdg . configFile . "abook/abookrc" = mkIf ( cfg . extraConfig != "" ) { 36text = '' 37# Generated by Home Manager. 38# See http://abook.sourceforge.net/ 39 40${ cfg . extraConfig } 41'' ; 42}; 43}; 44}