nix-server/hosts/nixos-server-reid/webapps/default.nix
2025-05-19 18:48:17 -07:00

56 lines
1.3 KiB
Nix
Executable file

{ config, lib, pkgs, ... }:
with lib;
let
in {
config = {
modules = {
services = {
# you should probably keep this on
# actually enables nginx, configures acme,
# gzip, optimization, proxy, ssl config,
# opens ports, and adds some Headers
nginx-config.enable = true;
staticSites = {
"reidlab.pink".dataDir = "/var/www/reidlab.pink";
};
forgejo = {
enable = true;
domain = "git.reidlab.pink";
};
matomo = {
enable = true;
domain = "analytics.reidlab.pink";
};
metrics = {
enable = true;
domain = "grafana.reidlab.pink";
};
amdl = {
enable = true;
domain = "amdl.reidlab.pink";
};
};
};
services = {
nginx.virtualHosts = {
"reidlab.pink" = {
locations."/f/".extraConfig = ''
add_header Access-Control-Allow-Origin "*";
'';
# TODO: we should perhaps add something to help with this in staticSites?
# just seems a little redundant if we get more pages like this
extraConfig = ''
error_page 404 /404.html;
'';
};
};
};
};
}