From 368241c89957ec70ddc789b23dc03f2518198bf6 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 29 Jul 2022 01:20:13 -0400 Subject: 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. --- Biz/Bild/Sources.json | 8 ++++---- Biz/Cloud/Chat.nix | 6 +++--- Biz/Cloud/Git.nix | 1 + Biz/Cloud/Gmnisrv.nix | 10 ++++++++-- Biz/Cloud/Web.nix | 3 +-- 5 files changed, 17 insertions(+), 11 deletions(-) (limited to 'Biz') diff --git a/Biz/Bild/Sources.json b/Biz/Bild/Sources.json index 22dae63..4da4f45 100644 --- a/Biz/Bild/Sources.json +++ b/Biz/Bild/Sources.json @@ -78,12 +78,12 @@ }, "nixos-mailserver": { "repo": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver", - "rev": "5675b122a947b40e551438df6a623efad19fd2e7", - "sha256": "1fwhb7a5v9c98nzhf3dyqf3a5ianqh7k50zizj8v5nmj3blxw4pi", + "rev": "f535d8123c4761b2ed8138f3d202ea710a334a1d", + "sha256": "0csx2i8p7gbis0n5aqpm57z5f9cd8n9yabq04bg1h4mkfcf7mpl6", "type": "tarball", - "url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/5675b122a947b40e551438df6a623efad19fd2e7/nixos-mailserver-5675b122a947b40e551438df6a623efad19fd2e7.tar.gz", + "url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/f535d8123c4761b2ed8138f3d202ea710a334a1d/nixos-mailserver-f535d8123c4761b2ed8138f3d202ea710a334a1d.tar.gz", "url_template": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive//nixos-mailserver-.tar.gz", - "version": "2021-06-10-master" + "version": "master" }, "nixpkgs": { "branch": "biz", diff --git a/Biz/Cloud/Chat.nix b/Biz/Cloud/Chat.nix index 0c29f3f..be856d8 100644 --- a/Biz/Cloud/Chat.nix +++ b/Biz/Cloud/Chat.nix @@ -22,9 +22,9 @@ in { # services.matrix-synapse = { enable = false; - server_name = config.networking.domain; - registration_shared_secret = "AkGRWSQLga3RoKRFnHhKoeCEIeZzu31y4TRzMRkMyRbBnETkVTSxilf24qySLzQn"; - listeners = [ + settings.server_name = config.networking.domain; + #registration_shared_secret = "AkGRWSQLga3RoKRFnHhKoeCEIeZzu31y4TRzMRkMyRbBnETkVTSxilf24qySLzQn"; + settings.listeners = [ { port = matrix_port; bind_address = "::1"; diff --git a/Biz/Cloud/Git.nix b/Biz/Cloud/Git.nix index a75fa82..fadf2aa 100644 --- a/Biz/Cloud/Git.nix +++ b/Biz/Cloud/Git.nix @@ -59,6 +59,7 @@ in { # git group users.users = { gitDaemon = { + group = "gitDaemon"; isSystemUser = true; description = "Git daemon user"; extraGroups = [ "git" ]; 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}"; }; }; } diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix index e0b9a95..c699b1b 100644 --- a/Biz/Cloud/Web.nix +++ b/Biz/Cloud/Web.nix @@ -37,10 +37,9 @@ in }; }; gmnisrv = { - package = pkgs.gmnisrv; enable = true; + listen = "0.0.0.0:${toString ports.gemini} [::]:${toString ports.gemini}"; settings = { - listen = "0.0.0.0:${toString ports.gemini} [::]:${toString ports.gemini}"; ":tls" = { store = "/var/lib/gmnisrv"; }; "bsima.me" = { "root" = "/var/web/ben"; -- cgit v1.2.3