From 3dcac0ab920842dc550799e5c4fca9a1f202a6f8 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 14 Jul 2021 21:36:42 -0400 Subject: fixes --- modules/hledger-web.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/hledger-web.nix b/modules/hledger-web.nix index e8f9862..d0fec13 100644 --- a/modules/hledger-web.nix +++ b/modules/hledger-web.nix @@ -15,6 +15,10 @@ in { type = lib.types.int; default = aliases.services.hledger-web.port; }; + domain = lib.mkOption { + type = lib.types.str; + default = "money.orbekk.com"; + }; }; }; @@ -34,11 +38,11 @@ in { script = '' cd /var/lib/hledger-web - hledger-web -f ${cfg.journalFile} --auto --port ${toString cfg.port} + hledger-web -f ${cfg.journalFile} --auto --port ${toString cfg.port} --serve --base-url "https://${cfg.domain}" ''; }; - services.nginx.virtualHosts."money.orbekk.com" = { + services.nginx.virtualHosts."${cfg.domain}" = { enableACME = true; forceSSL = true; locations."/" = { -- cgit v1.2.3