summaryrefslogtreecommitdiff
path: root/config/services/web/money/default.nix
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-08-16 10:09:56 +0200
committerQuentin Aristote <quentin@aristote.fr>2021-08-16 10:10:39 +0200
commitd821d5ecbcb07f2f2c148c6cbabbd62a2f358161 (patch)
tree0e05389ab018de5cc006933ab0435d940cf595f1 /config/services/web/money/default.nix
parent0174cd04b49c9df8f77733c164845e138d7ebc35 (diff)
config/services/web/default.nix
move ihatemoney to money.aristote.fr
Diffstat (limited to 'config/services/web/money/default.nix')
-rw-r--r--config/services/web/money/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/config/services/web/money/default.nix b/config/services/web/money/default.nix
new file mode 100644
index 0000000..9a84e07
--- /dev/null
+++ b/config/services/web/money/default.nix
@@ -0,0 +1,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
+ '';
+ };
+}