aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/workstation/mail/default.nix
blob: fd46a8a1f9dd62bdb82510a2399e28cc4f427292 (plain)
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
38
39
40
41
{ config, lib, pkgs, home-manager, ... } @ args:

let cfg = config.libkookie.workstation.mail;
in
with lib;
{
  options.libkookie.workstation.mail = {
    enable = mkEnableOption "libkookie mail system handling";

    configPath = mkOption {
      type = types.path;
      description = ''
        Set of configuration to configure sieve rules, and mail settings

        These are not contained in this repository to avoid having to 
        make them public.
      '';
    };

    authPath = mkOption {
      type = types.str;
      default = "/var/lib/mail/";
      description = ''
        Path to the authentication secret.  This is not an actual path, 
        to avoid it being copied to the nix store for any user to read.
      '';
    };

    mailArchive = mkOption {
      type = types.str;
      description = "Path to the mail archive to sync into";
    };

    access = mkOption {
      type = types.attrs;
      description = "User and group to give the mail user for permissions";
    };
  };

  config = mkIf cfg.enable (import ./core args);
}