summaryrefslogtreecommitdiff
path: root/Biz/Cloud/Gmnisrv.nix
diff options
context:
space:
mode:
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}";
};
};
}