From 55ee036fd7ebed24097c8da1ca8a0b0829264670 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 9 Mar 2024 22:56:01 +0100 Subject: big bang --- nix/hosts/corrino/www/events.emile.space.nix | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 nix/hosts/corrino/www/events.emile.space.nix (limited to 'nix/hosts/corrino/www/events.emile.space.nix') diff --git a/nix/hosts/corrino/www/events.emile.space.nix b/nix/hosts/corrino/www/events.emile.space.nix new file mode 100644 index 0000000..bb4db38 --- /dev/null +++ b/nix/hosts/corrino/www/events.emile.space.nix @@ -0,0 +1,59 @@ +{ ... }: + +{ + services.nginx.virtualHosts."events.emile.space" = { + forceSSL = true; + enableACME = true; + + locations = { + "/" = { + extraConfig = '' + proxy_pass http://[::1]:4000; + ''; + }; + }; + }; + + # Create users: + # + # go into the mobilizon-launchers directory within the nix store (systemctl + # status mobilizon..., you'll find it there somehow) + # + # ; sudo -u mobilizon ./bin/mobilizon_ctl users.new emile@emile.space --moderator --admin + + services = { + mobilizon = { + enable = true; + settings.":mobilizon" = { + "Mobilizon.Web.Endpoint" = { + url.host = "events.emile.space"; + http.port = 4000; + + # The IP address to listen on. Defaults to [::1] notated as a byte + # tuple. + # (Yes, this is an elexir application and they've mapped the type system + # into nix) + http.ip = { + _elixirType = "tuple"; + value = [ 0 0 0 0 0 0 0 1 ]; + }; + + has_reverse_proxy = true; + }; + + "Mobilizon.Storage.Repo" = { + username = "mobilizon"; + socket_dir = "/var/run/postgresql"; + database = "mobilizon_prod"; + }; + + ":instance" = rec { + name = "events.emile.space"; + hostname = "emile.space"; + email_reply_to = email_from; + email_from = "noreply@$emile.space"; + }; + }; + }; + }; +} -- cgit 1.4.1