nginx + forgejo + some content on zospace
This commit is contained in:
parent
68de124dfd
commit
f8b22b6a5d
3 changed files with 42 additions and 12 deletions
|
|
@ -7,10 +7,13 @@
|
|||
/etc/nixos/modules/ssl.nix
|
||||
/etc/nixos/modules/ssh.nix
|
||||
/etc/nixos/modules/tailscale.nix
|
||||
/etc/nixos/modules/sops.nix
|
||||
/etc/nixos/modules/ipfs
|
||||
|
||||
./hardware-configuration.nix
|
||||
./bootloader.nix
|
||||
./nginx.nix
|
||||
./forgejo.nix
|
||||
./user.nix
|
||||
];
|
||||
|
||||
|
|
@ -30,16 +33,5 @@
|
|||
pkgs.direnv
|
||||
];
|
||||
|
||||
security.acme.acceptTerms = true;
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts = {
|
||||
"zospace.freeboxos.fr" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".root = "/var/www/zospace.freeboxos.fr/";
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
|
|
|||
8
machines/homelab/forgejo.nix
Normal file
8
machines/homelab/forgejo.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
settings.server.HTTP_PORT = 8888;
|
||||
settings.server.DISABLE_SSH = true;
|
||||
settings.server.ROOT_URL = "https://zospace.freeboxos.fr/forgejo";
|
||||
};
|
||||
}
|
||||
30
machines/homelab/nginx.nix
Normal file
30
machines/homelab/nginx.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
security.acme.acceptTerms = true;
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts = {
|
||||
"zospace.freeboxos.fr" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/".root = "/var/www/zospace.freeboxos.fr/";
|
||||
|
||||
locations."/forgejo/" = {
|
||||
extraConfig = ''
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
client_max_body_size 512M;
|
||||
proxy_pass http://localhost:8888/;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
80
|
||||
443
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue