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/linus.onl/default.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'hosts/ahmed/linus.onl') diff --git a/hosts/ahmed/linus.onl/default.nix b/hosts/ahmed/linus.onl/default.nix index 52703fe..c31eb73 100644 --- a/hosts/ahmed/linus.onl/default.nix +++ b/hosts/ahmed/linus.onl/default.nix @@ -1,22 +1,15 @@ { pkgs, lib, - config, ... }: let - inherit (lib) mkEnableOption mkOption types mkIf optional; - + # The domain to serve. Also kinda embedded in the name of the module?? domain = "linus.onl"; - cfg = config.modules."${domain}"; + # Enable HTTPS stuff. + useACME = true; in { - options.modules."${domain}" = { - enable = mkEnableOption "${domain} static site"; - - useACME = mkEnableOption "built-in HTTPS stuff"; - }; - - config = mkIf cfg.enable { + config = { # Create a user to run the build script under. users.users."${domain}-builder" = { description = "builds ${domain}"; @@ -91,8 +84,8 @@ in { services.nginx = { virtualHosts."${domain}" = { # NOTE: 'forceSSL' will cause an infite loop, if the cloudflare proxy does NOT connect over HTTPS. - enableACME = cfg.useACME; - forceSSL = cfg.useACME; + enableACME = useACME; + forceSSL = useACME; root = "/var/www/${domain}"; }; }; -- cgit v1.2.3