diff options
author | Linnnus <[email protected]> | 2024-02-20 18:16:42 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-02-20 18:16:42 +0100 |
commit | b63d45d4bb3d9a49ac196acb3bf19aab35cb6b97 (patch) | |
tree | c25952ac8a3f9e6cee508c184d9d2af4dddce9e7 /hosts/ahmed/hellohtml.linus.onl | |
parent | 1f675d8a4f90ea5e043a281f5b2a748033ada082 (diff) |
tmp: Remove options in host-specific services (ahmed)reorg
Diffstat (limited to 'hosts/ahmed/hellohtml.linus.onl')
-rw-r--r-- | hosts/ahmed/hellohtml.linus.onl/default.nix | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/hosts/ahmed/hellohtml.linus.onl/default.nix b/hosts/ahmed/hellohtml.linus.onl/default.nix index feb56ba..2d09788 100644 --- a/hosts/ahmed/hellohtml.linus.onl/default.nix +++ b/hosts/ahmed/hellohtml.linus.onl/default.nix @@ -1,19 +1,10 @@ -{ - lib, - config, - ... -}: let - inherit (lib) mkEnableOption mkIf; +# This module defines the HelloHTML web server. It extends the NGINX config +# with a virtual server that proxies the local HelloHTML service. - cfg = config.modules."hellohtml.linus.onl"; +{ ... }: let + useACME = true; in { - options.modules."hellohtml.linus.onl" = { - enable = mkEnableOption "hellohtml.linus.onl site"; - - useACME = mkEnableOption "built-in HTTPS stuff"; - }; - - config = mkIf cfg.enable { + config = { # Start service listening on socket /tmp/hellohtml.sock services.hellohtml = { enable = true; @@ -24,8 +15,8 @@ in { # Use NGINX as reverse proxy. services.nginx.virtualHosts."hellohtml.linus.onl" = { - enableACME = cfg.useACME; - forceSSL = cfg.useACME; + enableACME = useACME; + forceSSL = useACME; locations."/" = rec { proxyPass = "http://localhost:8538"; # Disable settings that might mess with the text/event-stream response of the /listen/:id endpoint. |