2020-04-24 23:36:52 +00:00
|
|
|
# Evolution Data Server daemon.
|
|
|
|
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# Added 2021-05-07
|
|
|
|
imports = [
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "evolution-data-server" "enable" ]
|
|
|
|
[ "services" "gnome" "evolution-data-server" "enable" ]
|
|
|
|
)
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "evolution-data-server" "plugins" ]
|
|
|
|
[ "services" "gnome" "evolution-data-server" "plugins" ]
|
|
|
|
)
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.evolution-data-server = {
|
2021-02-05 17:12:51 +00:00
|
|
|
enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars.";
|
|
|
|
plugins = mkOption {
|
|
|
|
type = types.listOf types.package;
|
|
|
|
default = [ ];
|
|
|
|
description = "Plugins for Evolution Data Server.";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
2021-02-05 17:12:51 +00:00
|
|
|
programs.evolution = {
|
|
|
|
enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality.";
|
|
|
|
plugins = mkOption {
|
|
|
|
type = types.listOf types.package;
|
|
|
|
default = [ ];
|
|
|
|
example = literalExample "[ pkgs.evolution-ews ]";
|
|
|
|
description = "Plugins for Evolution.";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
config =
|
|
|
|
let
|
2021-05-20 23:08:51 +00:00
|
|
|
bundle = pkgs.evolutionWithPlugins.override { inherit (config.services.gnome.evolution-data-server) plugins; };
|
2021-02-05 17:12:51 +00:00
|
|
|
in
|
|
|
|
mkMerge [
|
2021-05-20 23:08:51 +00:00
|
|
|
(mkIf config.services.gnome.evolution-data-server.enable {
|
2021-02-05 17:12:51 +00:00
|
|
|
environment.systemPackages = [ bundle ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ bundle ];
|
|
|
|
|
|
|
|
systemd.packages = [ bundle ];
|
|
|
|
})
|
|
|
|
(mkIf config.programs.evolution.enable {
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.evolution-data-server = {
|
2021-02-05 17:12:51 +00:00
|
|
|
enable = true;
|
|
|
|
plugins = [ pkgs.evolution ] ++ config.programs.evolution.plugins;
|
|
|
|
};
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.gnome-keyring.enable = true;
|
2021-02-05 17:12:51 +00:00
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|