nix-server/hosts/nixos-server-reid/webapps/default.nix

47 lines
1 KiB
Nix
Executable file

{ config, lib, pkgs, ... }:
with lib;
let
in {
config = {
modules = {
services = {
forgejo = {
enable = true;
domain = "git.reidlab.online";
port = 3000;
};
# 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.online".dataDir = "/var/www/reidlab.online";
};
metrics = {
enable = true;
domain = "grafana.reidlab.online";
port = 2342;
};
};
};
services = {
nginx.virtualHosts = {
"reidlab.online" = {
locations."/f/".extraConfig = ''
add_header Access-Control-Allow-Origin "*";
'';
# we should perhaps add something to help with this in staticsites?
extraConfig = ''
error_page 404 /404.html;
'';
};
};
};
};
}