summaryrefslogtreecommitdiff
path: root/Biz/Cloud/Gmnisrv.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-07-29 01:20:13 -0400
committerBen Sima <ben@bsima.me>2022-07-29 01:20:13 -0400
commit368241c89957ec70ddc789b23dc03f2518198bf6 (patch)
tree3abd5a9e72e693eed626ca6e001f2d76faa5c241 /Biz/Cloud/Gmnisrv.nix
parenta988b5cc9d75ad23a23b0b34b35f00bdacc9a2e2 (diff)
Update nixos-mailserver and deploy Biz/Cloud.nix
The cloud was old, so some extra fixes snuck in that should have been a part of the nixpkgs upgrade.
Diffstat (limited to 'Biz/Cloud/Gmnisrv.nix')
-rw-r--r--Biz/Cloud/Gmnisrv.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/Biz/Cloud/Gmnisrv.nix b/Biz/Cloud/Gmnisrv.nix
index c60d271..2f7672b 100644
--- a/Biz/Cloud/Gmnisrv.nix
+++ b/Biz/Cloud/Gmnisrv.nix
@@ -10,13 +10,16 @@ in {
meta.maintainers = [ lib.maintainers.bsima ];
options.services.gmnisrv = {
enable = lib.mkEnableOption "Enable the gmnisrv service";
+ listen = lib.mkOption {
+ description = "Addresses and ports on which to listen.";
+ default = lib.mkDefault "0.0.0.0:1965 [::]:1965";
+ };
settings = lib.mkOption {
# type = cfgFormat.type;
description = ''
Configuration for gmnisrv. See gmnisrv.ini(5) for supported settings.
'';
default = {
- "listen" = lib.mkDefault "0.0.0.0:1965 [::]:1965";
":tls" = {
"store" = lib.mkDefault "${cfg.dataDir}/certs";
};
@@ -33,7 +36,10 @@ in {
description = "gmnisrv service";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
- script = "${pkgs.gmnisrv}/bin/gmnisrv -C ${lib.generators.toINI {} cfg.settings}";
+ script = let ini = lib.generators.toINIWithGlobalSection {} {
+ globalSection = {"listen" = cfg.listen;};
+ sections = cfg.settings;
+ }; in "${pkgs.gmnisrv}/bin/gmnisrv -C ${ini}";
};
};
}