From de26e20ed468a54591aa1cc0f18213dd6bf9368d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 17:47:55 -0300 Subject: [PATCH 1/3] phandom: remove wiki --- hosts/phantom/default.nix | 1 - hosts/phantom/renawiki.nix | 23 ----------------------- 2 files changed, 24 deletions(-) delete mode 100644 hosts/phantom/renawiki.nix diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 7bb0fb0..919e681 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -10,7 +10,6 @@ ./syncthing.nix ./users.nix ./writefreely.nix - ./renawiki.nix ./email.nix ./forgejo.nix ]; diff --git a/hosts/phantom/renawiki.nix b/hosts/phantom/renawiki.nix deleted file mode 100644 index 5b21907..0000000 --- a/hosts/phantom/renawiki.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, pkgs, inputs, ... }: { - services.mediawiki = { - enable = true; - name = "Rena Wiki"; - - webserver = "nginx"; - nginx.hostName = "renawiki.lelgenio.xyz"; - passwordFile = config.age.secrets.phantom-renawiki.path; - - extensions.VisualEditor = null; - }; - services.nginx.virtualHosts."renawiki.lelgenio.xyz" = { - enableACME = true; - forceSSL = true; - }; - - age.secrets.phantom-renawiki = { - file = ../../secrets/phantom-renawiki.age; - mode = "400"; - owner = "mediawiki"; - }; -} - From 0f10937be89ef2ac31cd83f07991cd2378367736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 18:00:19 -0300 Subject: [PATCH 2/3] phantom: move from .xyz to .com --- hosts/phantom/default.nix | 4 ++-- hosts/phantom/email.nix | 13 ++++++++++--- hosts/phantom/forgejo.nix | 8 ++++---- hosts/phantom/mastodon.nix | 2 +- hosts/phantom/nextcloud.nix | 2 +- hosts/phantom/syncthing.nix | 2 +- hosts/phantom/writefreely.nix | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index 919e681..a0e99b7 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -14,7 +14,7 @@ ./forgejo.nix ]; - services.nginx.virtualHosts."lelgenio.xyz" = { + services.nginx.virtualHosts."lelgenio.com" = { enableACME = true; forceSSL = true; root = pkgs.runCommand "www-dir" { } '' @@ -50,7 +50,7 @@ dates = "04:40"; operation = "switch"; flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ]; - flake = "git+https://git.lelgenio.xyz/lelgenio/nixos-config#phantom"; + flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom"; }; system.stateVersion = "23.05"; # Never change this diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index e778de4..6c637be 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -8,20 +8,27 @@ mailserver = { enable = true; - fqdn = "lelgenio.xyz"; + fqdn = "lelgenio.com"; domains = [ "lelgenio.xyz" "git.lelgenio.xyz" + "lelgenio.com" + "git.lelgenio.com" + "social.lelgenio.com" ]; certificateScheme = "acme-nginx"; # Create passwords with # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' loginAccounts = { + "lelgenio@lelgenio.com" = { + hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS"; + aliases = [ "postmaster@lelgenio.com" ]; + }; "lelgenio@lelgenio.xyz" = { hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS"; aliases = [ "postmaster@lelgenio.xyz" ]; }; - "noreply@git.lelgenio.xyz" = { + "noreply@git.lelgenio.com" = { hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0."; }; }; @@ -36,7 +43,7 @@ services.roundcube = { enable = true; package = pkgs.roundcube.withPlugins (p: [ p.carddav ]); - hostName = "mail.lelgenio.xyz"; + hostName = "mail.lelgenio.com"; extraConfig = '' $config['smtp_host'] = "tls://${config.mailserver.fqdn}:587"; $config['smtp_user'] = "%u"; diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index 4e6327b..61f0a51 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -26,15 +26,15 @@ in DEFAULT_ACTIONS_URL = "github"; }; server = { - DOMAIN = "git.lelgenio.xyz"; + DOMAIN = "git.lelgenio.com"; HTTP_PORT = 3000; ROOT_URL = "https://${srv.DOMAIN}/"; }; mailer = { ENABLED = true; - SMTP_ADDR = "mail.lelgenio.xyz"; - FROM = "noreply@git.lelgenio.xyz"; - USER = "noreply@git.lelgenio.xyz"; + SMTP_ADDR = "mail.lelgenio.com"; + FROM = "noreply@git.lelgenio.com"; + USER = "noreply@git.lelgenio.com"; }; }; mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path; diff --git a/hosts/phantom/mastodon.nix b/hosts/phantom/mastodon.nix index adfaf0d..3deaee5 100644 --- a/hosts/phantom/mastodon.nix +++ b/hosts/phantom/mastodon.nix @@ -2,7 +2,7 @@ services.mastodon = { enable = true; configureNginx = true; - localDomain = "social.lelgenio.xyz"; + localDomain = "social.lelgenio.com"; smtp.fromAddress = "lelgenio@disroot.org"; streamingProcesses = 2; extraConfig.SINGLE_USER_MODE = "true"; diff --git a/hosts/phantom/nextcloud.nix b/hosts/phantom/nextcloud.nix index 5bddece..20c7173 100644 --- a/hosts/phantom/nextcloud.nix +++ b/hosts/phantom/nextcloud.nix @@ -2,7 +2,7 @@ services.nextcloud = { enable = true; package = pkgs.nextcloud27; - hostName = "cloud.lelgenio.xyz"; + hostName = "cloud.lelgenio.com"; https = true; config = { adminpassFile = config.age.secrets.phantom-nextcloud.path; diff --git a/hosts/phantom/syncthing.nix b/hosts/phantom/syncthing.nix index a971b86..55e4cbc 100644 --- a/hosts/phantom/syncthing.nix +++ b/hosts/phantom/syncthing.nix @@ -7,7 +7,7 @@ openDefaultPorts = true; }; - services.nginx.virtualHosts."syncthing.lelgenio.xyz" = { + services.nginx.virtualHosts."syncthing.lelgenio.com" = { enableACME = true; forceSSL = true; locations."/" = { diff --git a/hosts/phantom/writefreely.nix b/hosts/phantom/writefreely.nix index 6a2652e..3530e06 100644 --- a/hosts/phantom/writefreely.nix +++ b/hosts/phantom/writefreely.nix @@ -4,7 +4,7 @@ acme.enable = true; nginx.enable = true; nginx.forceSSL = true; - host = "blog.lelgenio.xyz"; + host = "blog.lelgenio.com"; admin.name = "lelgenio"; admin.initialPasswordFile = config.age.secrets.phantom-writefreely.path; settings.app = { From f027fc10c626ddef476e5545a3286939a8391af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sat, 11 May 2024 18:32:05 -0300 Subject: [PATCH 3/3] mastodon: configure noreply email --- hosts/phantom/email.nix | 3 +++ hosts/phantom/mastodon.nix | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/hosts/phantom/email.nix b/hosts/phantom/email.nix index 6c637be..b431807 100644 --- a/hosts/phantom/email.nix +++ b/hosts/phantom/email.nix @@ -31,6 +31,9 @@ "noreply@git.lelgenio.com" = { hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0."; }; + "noreply@social.lelgenio.com" = { + hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0."; + }; }; }; diff --git a/hosts/phantom/mastodon.nix b/hosts/phantom/mastodon.nix index 3deaee5..cf85b07 100644 --- a/hosts/phantom/mastodon.nix +++ b/hosts/phantom/mastodon.nix @@ -3,7 +3,13 @@ enable = true; configureNginx = true; localDomain = "social.lelgenio.com"; - smtp.fromAddress = "lelgenio@disroot.org"; + smtp = { + authenticate = true; + host = "lelgenio.com"; + fromAddress = "noreply@social.lelgenio.com"; + user = "noreply@social.lelgenio.com"; + passwordFile = config.age.secrets.phantom-forgejo-mailer-password.path; + }; streamingProcesses = 2; extraConfig.SINGLE_USER_MODE = "true"; mediaAutoRemove.olderThanDays = 10;