at master 1.7 kB view raw
1# Evolution Data Server daemon. 2 3{ 4 config, 5 lib, 6 pkgs, 7 ... 8}: 9 10{ 11 12 meta = { 13 maintainers = lib.teams.gnome.members; 14 }; 15 16 ###### interface 17 18 options = { 19 20 services.gnome.evolution-data-server = { 21 enable = lib.mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars"; 22 plugins = lib.mkOption { 23 type = lib.types.listOf lib.types.package; 24 default = [ ]; 25 description = "Plugins for Evolution Data Server."; 26 }; 27 }; 28 programs.evolution = { 29 enable = lib.mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality"; 30 plugins = lib.mkOption { 31 type = lib.types.listOf lib.types.package; 32 default = [ ]; 33 example = lib.literalExpression "[ pkgs.evolution-ews ]"; 34 description = "Plugins for Evolution."; 35 }; 36 37 }; 38 }; 39 40 ###### implementation 41 42 config = 43 let 44 bundle = pkgs.evolutionWithPlugins.override { 45 inherit (config.services.gnome.evolution-data-server) plugins; 46 }; 47 in 48 lib.mkMerge [ 49 (lib.mkIf config.services.gnome.evolution-data-server.enable { 50 environment.systemPackages = [ bundle ]; 51 52 services.dbus.packages = [ bundle ]; 53 54 systemd.packages = [ bundle ]; 55 }) 56 (lib.mkIf config.programs.evolution.enable { 57 services.gnome.evolution-data-server = { 58 enable = true; 59 plugins = [ pkgs.evolution ] ++ config.programs.evolution.plugins; 60 }; 61 services.gnome.gnome-keyring.enable = true; 62 }) 63 ]; 64}