nrec-nixos01: add Forgejo with Caddy reverse proxy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,7 @@
|
|||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
22
|
22
|
||||||
80
|
80
|
||||||
|
443
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.substituters = [
|
nix.settings.substituters = [
|
||||||
@@ -64,9 +65,9 @@
|
|||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts.":80" = {
|
virtualHosts."nrec-nixos01.t-juice.club" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
respond "Hello from nrec-nixos01"
|
reverse_proxy 127.0.0.1:3000
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../../system/packages.nix
|
../../system/packages.nix
|
||||||
|
../../services/forgejo
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
17
services/forgejo/default.nix
Normal file
17
services/forgejo/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user