diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-07-14 21:36:42 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-07-14 21:36:49 -0400 |
commit | 3dcac0ab920842dc550799e5c4fca9a1f202a6f8 (patch) | |
tree | c872e3b3eaac3647698630eec5824477c3b13fa7 | |
parent | e417ce26347e3d12f26b3b8fb6dff6995d3ee144 (diff) |
fixes
-rw-r--r-- | modules/hledger-web.nix | 8 |
1 files changed, 6 insertions, 2 deletions
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."/" = { |