diff --git a/hosts/trimounts/modules/bsky.nix b/hosts/trimounts/modules/bsky.nix new file mode 100644 index 0000000..e04ff97 --- /dev/null +++ b/hosts/trimounts/modules/bsky.nix @@ -0,0 +1,24 @@ +{ ... }: +let + domain = "bsky.klbr.net"; +in +{ + security.acme.certs.${domain} = { }; + services.nginx.virtualHosts.${domain} = { + useACMEHost = domain; + forceSSL = true; + quic = true; + kTLS = true; + locations."/" = { + root = "/var/www/bsky"; + tryFiles = "$uri $uri/ /index.html"; + }; + locations."/assets/" = { + root = "/var/www/bsky"; + extraConfig = '' + expires 1y; + add_header Cache-Control "public, immutable"; + ''; + }; + }; +} diff --git a/hosts/trimounts/modules/slopview.nix b/hosts/trimounts/modules/slopview.nix deleted file mode 100644 index 824574e..0000000 --- a/hosts/trimounts/modules/slopview.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ terra, ... }: -let - port = 8000; - - domain = "bsky.klbr.net"; -in { - # users.users.slopview = { - # isSystemUser = true; - # group = "slopview"; - # }; - # users.groups.slopview = {}; - - # systemd.services.slopview = { - # description = "slopview"; - # wantedBy = ["multi-user.target"]; - # after = ["network.target"]; - - # environment = { - # PORT = toString port; - # SEED_ACCOUNT = "did:plc:dfl62fgb7wtjj3fcbb72naae"; - # }; - - # serviceConfig = rec { - # ExecStart = "${terra.slopview}/bin/appview"; - # User = "slopview"; - # Group = "slopview"; - # StateDirectory = "slopview"; - # WorkingDirectory = "%S/${StateDirectory}"; - # Restart = "on-failure"; - # RestartSec = "5s"; - # }; - # }; - - security.acme.certs.${domain} = {}; - services.nginx.virtualHosts.${domain} = { - useACMEHost = domain; - forceSSL = true; - quic = true; - kTLS = true; - locations."/".proxyPass = "http://chernobog:${toString port}"; - }; -}