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"; + }; + }; +}