summaryrefslogtreecommitdiff
path: root/config/services/web/money/default.nix
blob: 9a84e07577f3c37db4a8d8d33037ddebe1273350 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ lib, config, ... }:

let cfg = config.services.ihatemoney;
in {
  services.nginx.virtualHosts."money.aristote.fr" = lib.mkIf cfg.enable {
    forceSSL = true;
    enableACME = true;
    "/".proxyPass = "http://127.0.0.1${cfg.uwsgiConfig.http}/";
  };

  services.ihatemoney = {
    enable = true;
    enableAdminDashboard = true;
    adminHashedPassword =
      "pbkdf2:sha256:150000$s78RCYkJ$9c15a62ed1c89625cb78b5bde87d03b6dd1a03831afa4dbb2abb15ea4c1e150b";
    uwsgiConfig = { http = ":8000"; };
  };

  services.opensmtpd = lib.mkIf cfg.enable {
    enable = true;
    serverConfiguration = ''
      listen on lo
      action block mda "cat >/dev/null"
      match from any for any action block
    '';
  };
}