diff --git a/clients/quadraticserver/mail/automx2.nix b/clients/quadraticserver/mail/automx2.nix deleted file mode 100644 index 9421b1e..0000000 --- a/clients/quadraticserver/mail/automx2.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - lib, - config, - ... -}: { - services = let - domain = lib.head config.mailserver.domains; - fqdn = config.mailserver.fqdn; - in { - caddy.virtualHosts = { - "autoconfig.${domain}" = { - serverAliases = ["autodiscover.${domain}"]; - extraConfig = let - proxy = "reverse_proxy 127.0.0.1:${toString config.services.automx2.port}"; - in '' - route { - handle_path /initdb* { - @not_local not remote_ip 127.0.0.1 - abort @not_local - ${proxy} - } - - ${proxy} - } - ''; - }; - }; - automx2 = { - enable = true; - inherit domain; - settings = { - provider = "Federated Nexus"; - domains = [domain]; - servers = [ - { - type = "imap"; - name = fqdn; - } - { - type = "smtp"; - name = fqdn; - } - ]; - }; - }; - }; -} diff --git a/clients/quadraticserver/mail/bridges.nix b/clients/quadraticserver/mail/bridges.nix deleted file mode 100644 index b344fb3..0000000 --- a/clients/quadraticserver/mail/bridges.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - pkgs, - inputs, - config, - ... -}: let - settings = { - backfill.enabled = true; - - appservice = { - as_token = "$CUSTOM_AS_TOKEN"; - hs_token = "$CUSTOM_HS_TOKEN"; - }; - - homeserver = { - domain = config.services.grapevine.settings.server_name; - address = config.services.grapevine.settings.server_discovery.client.base_url; - }; - - bridge = { - encryption = { - allow = true; - default = true; - require = false; - }; - permissions = { - "${config.services.grapevine.settings.server_name}" = "user"; - "@quadradical:${config.services.grapevine.settings.server_name}" = "admin"; - }; - }; - }; -in { - imports = [inputs.nix-matrix-appservices.nixosModule inputs.ooye.modules.default]; - - services = let - domain = "ooye.federated.nexus"; - in { - matrix-appservices.services = builtins.mapAttrs (name: value: - value - // { - inherit settings; - format = "mautrix-go"; - port = 8000; - package = value.package.override {withGoolm = true;}; - }) { - whatsapp = { - host = "127.0.0.4"; - serviceConfig.EnvironmentFile = config.age.secrets."whatsapp.age".path; - package = pkgs.mautrix-whatsapp; - }; - gmessages = { - host = "127.0.0.5"; - serviceConfig.EnvironmentFile = config.age.secrets."gmessages.age".path; - package = inputs.nixpkgs-goolm.legacyPackages.${pkgs.system}.mautrix-gmessages; - }; - }; - - matrix-ooye = { - enable = true; - homeserver = config.services.grapevine.settings.server_discovery.client.base_url; - homeserverName = "federated.nexus"; - discordTokenPath = config.age.secrets."discordToken.age".path; - discordClientSecretPath = config.age.secrets."discordClientSecret.age".path; - socket = "8081"; - bridgeOrigin = "https://${domain}"; - }; - - caddy.virtualHosts."${domain}".extraConfig = "reverse_proxy 127.0.0.1:8081"; - }; -} diff --git a/clients/quadraticserver/mail/mailserver.nix b/clients/quadraticserver/mail/mailserver.nix deleted file mode 100644 index c4bbe46..0000000 --- a/clients/quadraticserver/mail/mailserver.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - inputs, - ... -}: let - domain = "federated.nexus"; - fqdn = "mail.${domain}"; - certDir = "/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/${fqdn}"; -in { - imports = [inputs.mailserver.nixosModule]; - mailserver = { - enable = true; - stateVersion = 3; - - inherit fqdn; - domains = [domain]; - - localDnsResolver = false; - - certificateScheme = "manual"; - certificateFile = "${certDir}/${fqdn}.crt"; - keyFile = "${certDir}/${fqdn}.key"; - - oauth2 = let - auth = "https://auth.federated.nexus"; - in { - enable = true; - introspection = { - url = "${auth}/introspect"; - mode = "post"; - }; - oidc.configuration_url = "${auth}/.well-known/openid-configuration"; - }; - }; - - services.dovecot2.group = config.services.caddy.group; -} diff --git a/clients/quadraticserver/mail/roundcube/default.nix b/clients/quadraticserver/mail/roundcube/default.nix deleted file mode 100644 index 5a4cc23..0000000 --- a/clients/quadraticserver/mail/roundcube/default.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services = { - phpfpm.pools.roundcube.settings = { - "listen.owner" = "caddy"; - "listen.group" = "caddy"; - }; - roundcube = { - enable = true; - configureNginx = false; - - package = pkgs.roundcube.overrideAttrs (oldAttrs: { - version = "1.7-beta"; - - src = pkgs.fetchurl { - url = "https://github.com/roundcube/roundcubemail/releases/download/1.7-beta/roundcubemail-1.7-beta-complete.tar.gz"; - sha256 = "sha256-gYY+tyR1aPAo43oH3Prgwd0A7XmiFASZ7KWxXuf4vpk="; - }; - - patches = [./update.patch]; - - installPhase = '' - mkdir $out - cp -r * $out/ - ln -sf /etc/roundcube/config.inc.php $out/config/config.inc.php - rm -rf $out/installer - ''; - }); - - extraConfig = '' - // General - $config["skin_logo"] = "https://federated.nexus/images/icon.svg"; - $config["use_https"] = true; - - // OAuth - $config["oauth_provider"] = "generic"; - $config["oauth_provider_name"] = "Federated Nexus"; - $config["oauth_login_redirect"] = true; - - $config["oauth_config_uri"] = "https://auth.federated.nexus/.well-known/openid-configuration"; - - $config["oauth_client_id"] = "roundcube"; - $config["oauth_client_secret"] = "secret"; - - $config["oauth_scope"] = ""; - $config["oauth_scope"] = ""; - ''; - }; - - caddy.virtualHosts."mail.federated.nexus".extraConfig = '' - root * ${config.services.roundcube.package}/public_html - - php_fastcgi unix/${config.services.phpfpm.pools.roundcube.socket} - file_server - ''; - }; -} diff --git a/clients/quadraticserver/mail/roundcube/update.patch b/clients/quadraticserver/mail/roundcube/update.patch deleted file mode 100644 index c7127be..0000000 --- a/clients/quadraticserver/mail/roundcube/update.patch +++ /dev/null @@ -1,22 +0,0 @@ -From c0a516b09316a8bb73c872d9da2f584e5ed5b112 Mon Sep 17 00:00:00 2001 -From: Henry Hiles -Date: Mon, 21 Jul 2025 21:27:10 -0400 -Subject: [PATCH] Fix update script for nix - ---- - bin/update.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bin/update.sh b/bin/update.sh -index 5058f33f16..41361d9481 100755 ---- a/bin/update.sh -+++ b/bin/update.sh -@@ -19,7 +19,7 @@ - +-----------------------------------------------------------------------+ - */ - --define('INSTALL_PATH', realpath(__DIR__ . '/..') . '/'); -+define('INSTALL_PATH', dirname(dirname($argv[0])).'/'); - - require_once INSTALL_PATH . 'program/include/clisetup.php'; - diff --git a/flake.lock b/flake.lock index b9e59cd..b2e0e76 100644 --- a/flake.lock +++ b/flake.lock @@ -668,11 +668,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1752677629, - "narHash": "sha256-ze2bcq5RSasEwvT6PR8EMedF4o8RoBtVB5ny6Jd9tA4=", + "lastModified": 1753208071, + "narHash": "sha256-0q4HUdFy/dzOm0pD/TzcpkFAfA/JTaRq9oXy05yg0EE=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "15ac3dfeaf828a9336e7e199123f8020cf04f440", + "rev": "2615749a60ad731a2a2bbbe45d8b468bf1d8cdf8", "type": "github" }, "original": { @@ -2641,11 +2641,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1753182975, - "narHash": "sha256-DYa27iNM4GBMLgcX6s6ix5tux8a/sjmrC8gRmDb9bvI=", + "lastModified": 1753212822, + "narHash": "sha256-l+xtl7MlXGthEVomOCCmAxnatPfcQcf++8D0WBpNlxU=", "owner": "wamserma", "repo": "flake-programs-sqlite", - "rev": "a79f1edd18cc601501831336f82feb65b09a0185", + "rev": "44129ce7e322055bdd3383bba6f4a67da25cd63f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7f83872..c68f0c1 100755 --- a/flake.nix +++ b/flake.nix @@ -9,14 +9,6 @@ url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; }; - # mailserver = { - # url = "gitlab:simple-nixos-mailserver/nixos-mailserver"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; - mailserver = { - url = "git+file:///home/quadradical/Documents/Code/nixos-mailserver"; - inputs.nixpkgs.follows = "nixpkgs"; - }; run0-sudo-shim = { url = "github:lordgrimmauld/run0-sudo-shim"; inputs.nixpkgs.follows = "nixpkgs";