nrec-nixos01: add Forgejo with Caddy reverse proxy #45

Merged
torjus merged 1 commits from nrec-forgejo into master 2026-03-08 13:50:47 +00:00
3 changed files with 21 additions and 2 deletions
Showing only changes of commit cfc0c6f6cb - Show all commits

View File

@@ -53,6 +53,7 @@
networking.firewall.allowedTCPPorts = [
22
80
443
];
nix.settings.substituters = [
@@ -64,9 +65,9 @@
services.caddy = {
enable = true;
virtualHosts.":80" = {
virtualHosts."nrec-nixos01.t-juice.club" = {
extraConfig = ''
respond "Hello from nrec-nixos01"
reverse_proxy 127.0.0.1:3000
'';
};
};

View File

@@ -3,6 +3,7 @@
imports = [
./configuration.nix
../../system/packages.nix
../../services/forgejo
(modulesPath + "/profiles/qemu-guest.nix")
];
}

View File

@@ -0,0 +1,17 @@
{ ... }:
{
services.forgejo = {
enable = true;
database.type = "sqlite3";
settings = {
server = {
DOMAIN = "nrec-nixos01.t-juice.club";
ROOT_URL = "https://nrec-nixos01.t-juice.club/";
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
session.COOKIE_SECURE = true;
};
};
}