aboutsummaryrefslogtreecommitdiff
path: root/snowfall/modules
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-04-14 14:57:41 -0700
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:53 -0700
commit1075fef7a571393d40a016f55ef567bcd099c62a (patch)
tree784eb01dc249d4be2256d10e67b5855a82a48f7b /snowfall/modules
parent5ee9dd8cf0bbf837f967f6c902b8fd3c427ff495 (diff)
migration: stargazers webserver
Diffstat (limited to 'snowfall/modules')
-rw-r--r--snowfall/modules/nixos/services/web/stargazers/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/snowfall/modules/nixos/services/web/stargazers/default.nix b/snowfall/modules/nixos/services/web/stargazers/default.nix
new file mode 100644
index 0000000..3e9b46e
--- /dev/null
+++ b/snowfall/modules/nixos/services/web/stargazers/default.nix
@@ -0,0 +1,34 @@
+{ options, config, lib, namespace, ... }:
+
+with lib; with lib.${namespace}; let
+ cfg = config.${namespace}.services.web.stargazers;
+ impermanence = config.${namespace}.system.impermanence;
+in {
+ options.${namespace}.services.web.stargazers = with types; {
+ enable = mkEnableOption "stargazers webserver";
+ };
+
+ config = mkIf cfg.enable {
+ cxl.services.web.enable = true;
+
+ environment.persistence.${impermanence.location} = {
+ directories = [
+ "/srv/web/stargazers"
+ ];
+ };
+
+ networking.firewall.allowedTCPPorts = [ 80 443 ];
+
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "stargazers.xn--6frz82g" = {
+ addSSL = true;
+ enableACME = true;
+
+ root = "/srv/web/stargazers";
+ };
+ };
+ };
+ };
+}