diff options
Diffstat (limited to 'modules/nixos/services/web/cxl.sh/default.nix')
| -rw-r--r-- | modules/nixos/services/web/cxl.sh/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/nixos/services/web/cxl.sh/default.nix b/modules/nixos/services/web/cxl.sh/default.nix new file mode 100644 index 0000000..86b35d1 --- /dev/null +++ b/modules/nixos/services/web/cxl.sh/default.nix @@ -0,0 +1,32 @@ +{ options, config, lib, namespace, ... }: + +with lib; with lib.${namespace}; let + cfg = config.${namespace}.services.web.cxl.sh; + impermanence = config.${namespace}.system.impermanence; +in { + options.${namespace}.services.web.cxl.sh = with types; { + enable = mkEnableOption "cxl.sh webserver"; + }; + + config = mkIf cfg.enable { + cxl.services.web.enable = true; + + environment.persistence.${impermanence.location} = { + directories = [ + "/srv/web/cxl.sh" + ]; + }; + + services.nginx = { + enable = true; + virtualHosts = { + "cxl.sh" = { + addSSL = true; + enableACME = true; + + root = "/srv/web/cxl.sh"; + }; + }; + }; + }; +} |