From b63d45d4bb3d9a49ac196acb3bf19aab35cb6b97 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Tue, 20 Feb 2024 18:16:42 +0100 Subject: tmp: Remove options in host-specific services (ahmed) --- hosts/ahmed/hellohtml.linus.onl/default.nix | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'hosts/ahmed/hellohtml.linus.onl') 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. -- cgit v1.2.3