aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/modules/workstation/mail/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/modules/workstation/mail/default.nix')
-rw-r--r--infra/libkookie/modules/workstation/mail/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/infra/libkookie/modules/workstation/mail/default.nix b/infra/libkookie/modules/workstation/mail/default.nix
new file mode 100644
index 000000000000..fd46a8a1f9dd
--- /dev/null
+++ b/infra/libkookie/modules/workstation/mail/default.nix
@@ -0,0 +1,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);
+}