summary refs log tree commit diff
path: root/nixos/modules/programs/nylas-mail.nix
blob: 9a6cf755f2a27a2415766f189257f86277b5a360 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ config, lib, pkgs, ... }:

with lib;

let
  cfg = config.services.nylas-mail;
  defaultUser = "nylas-mail";
in {
  ###### interface
  options = {
    services.nylas-mail = {

      enable = mkEnableOption ''
        nylas-mail - Open-source mail client built on the modern web with Electron, React, and Flux
      '';

      gnome3-keyring = mkOption {
        type = types.bool;
        default = true;
        description = "Enable gnome3 keyring for nylas-mail.";
      };
    };
  };


  ###### implementation

  config = mkIf cfg.enable {

    environment.systemPackages = [ pkgs.nylas-mail-bin ];

    services.gnome3.gnome-keyring = mkIf cfg.gnome3-keyring {
      enable = true;
    };

  };
}