From d887567e3b2d84ab1ed4d51648c446ae8229bc7f Mon Sep 17 00:00:00 2001 From: Mewp Date: Sun, 9 Feb 2025 11:48:42 +0000 Subject: [PATCH] Add listmonk --- configuration.nix | 2 ++ dns.nix | 24 ++++++++++++++++++++++++ listmonk.nix | 16 ++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 dns.nix create mode 100644 listmonk.nix diff --git a/configuration.nix b/configuration.nix index d726986..1b9d7de 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,8 +13,10 @@ ./nextcloud.nix ./authentik.nix ./forgejo.nix + ./listmonk.nix ./backups.nix ./site.nix + ./dns.nix ]; boot.loader.systemd-boot.enable = true; diff --git a/dns.nix b/dns.nix new file mode 100644 index 0000000..2b3b86a --- /dev/null +++ b/dns.nix @@ -0,0 +1,24 @@ +{ pkgs, config, ... }: let + mewp-nixos = builtins.fetchGit { + url = "https://gitlab.com/mewp/mewp-nixos"; + rev = "7927ac83f90d82f894877ac1ede04a54ed4e6d24"; + }; +in { + imports = [ + "${mewp-nixos}/dns.nix" + ]; + + config = { + mewp.dns.zones."news.cebula.camp" = { + SOA = { + nameServer = "szalotka.cebula.camp"; + adminEmail = "hostmaster@cebula.camp"; + serial = 0; + }; + NS = [ "szalotka.cebula.camp." ]; + A = [ "135.181.235.222" ]; + MX = [ "10 szalotka.cebula.camp." ]; + TXT = [ "v=spf1 mx -all" ]; + }; + }; +} diff --git a/listmonk.nix b/listmonk.nix new file mode 100644 index 0000000..8affcc7 --- /dev/null +++ b/listmonk.nix @@ -0,0 +1,16 @@ +{ pkgs, config, ... }: { + + services.listmonk = { + enable = true; + database.createLocally = true; + settings.app.address = "127.0.0.1:9002"; + }; + + services.nginx.virtualHosts."news.cebula.camp" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:9002"; + }; + }; +}