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.nix40
1 files changed, 0 insertions, 40 deletions
diff --git a/Biz/Cloud/Gmnisrv.nix b/Biz/Cloud/Gmnisrv.nix
deleted file mode 100644
index e2a66f6..0000000
--- a/Biz/Cloud/Gmnisrv.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{ lib, config, pkgs, ... }:
-
-let cfg = config.services.gmnisrv;
-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 = {
- ":tls" = { "store" = lib.mkDefault "${cfg.dataDir}/certs"; };
- };
- };
- dataDir = lib.mkOption {
- type = lib.types.str;
- default = "/var/lib/gemini";
- description = "Where gmnisrv should store certs and other data.";
- };
- };
- config = lib.mkIf cfg.enable {
- systemd.services.gmnisrv = {
- description = "gmnisrv service";
- wantedBy = [ "multi-user.target" ];
- after = [ "network-online.target" ];
- script = let
- ini = lib.generators.toINIWithGlobalSection { } {
- globalSection = { "listen" = cfg.listen; };
- sections = cfg.settings;
- };
- in "${pkgs.gmnisrv}/bin/gmnisrv -C ${ini}";
- };
- };
-}