1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 09:49:39 +01:00
home-manager/modules/programs/offlineimap/accounts.nix
Austin Horstman 4fca600cb1 treewide: implement auto importing for modules
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.

Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-22 23:58:37 -05:00

53 lines
1.1 KiB
Nix

{ lib, ... }:
let
inherit (lib) mkOption types;
extraConfigType = with types; attrsOf (either (either str int) bool);
in
{
options.offlineimap = {
enable = lib.mkEnableOption "OfflineIMAP";
extraConfig.account = mkOption {
type = extraConfigType;
default = { };
example = {
autorefresh = 20;
};
description = ''
Extra configuration options to add to the account section.
'';
};
extraConfig.local = mkOption {
type = extraConfigType;
default = { };
example = {
sync_deletes = true;
};
description = ''
Extra configuration options to add to the local account
section.
'';
};
extraConfig.remote = mkOption {
type = extraConfigType;
default = { };
example = {
maxconnections = 2;
expunge = false;
};
description = ''
Extra configuration options to add to the remote account
section.
'';
};
postSyncHookCommand = mkOption {
type = types.lines;
default = "";
description = "Command to run after fetching new mails.";
};
};
}