From 098da93e5deb2fc0043e15f3817191f5bd668e34 Mon Sep 17 00:00:00 2001 From: Quentin Aristote Date: Sat, 14 Aug 2021 19:33:50 +0200 Subject: restructure project --- config/services/web/quentin/default.nix | 13 +++++++++++++ config/services/web/quentin/ihatemoney/default.nix | 21 +++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 config/services/web/quentin/default.nix create mode 100644 config/services/web/quentin/ihatemoney/default.nix (limited to 'config/services/web/quentin') diff --git a/config/services/web/quentin/default.nix b/config/services/web/quentin/default.nix new file mode 100644 index 0000000..6ca712c --- /dev/null +++ b/config/services/web/quentin/default.nix @@ -0,0 +1,13 @@ +{ pkgs, lib, config, ... }: + +{ + import = [ + ./ihatemoney + ]; + + services.nginx.virtualHosts."quentin.aristote.fr" = { + locations."/".root = "${pkgs.personal.academic-webpage}"; + forceSSL = true; + enableACME = true; + }; +} diff --git a/config/services/web/quentin/ihatemoney/default.nix b/config/services/web/quentin/ihatemoney/default.nix new file mode 100644 index 0000000..8a29aec --- /dev/null +++ b/config/services/web/quentin/ihatemoney/default.nix @@ -0,0 +1,21 @@ +{ lib, config, ... }: + +let cfg = config.services.ihatemoney; +in { + services.nginx.virtualHosts."quentin.aristote.fr".locations = + lib.mkIf cfg.enable { + "/money/".proxyPass = "http://127.0.0.1${cfg.uwsgiConfig}"; + }; + + services.ihatemoney = { + enable = true; + enableAdminDashboard = true; + adminHashedPassword = + "pbkdf2:sha256:150000$s78RCYkJ$9c15a62ed1c89625cb78b5bde87d03b6dd1a03831afa4dbb2abb15ea4c1e150b"; + uwsgiConfig = { http = ":8000"; }; + extraConfig = '' + APPLICATION_ROOT = "https://quentin.aristote.fr/money/" + ''; + }; + +} -- cgit v1.2.3