feat: infrastructure updates and documentation improvements
- Update Forgejo service configuration on grey-area - Refine reverse-proxy network configuration - Add README_new.md with enhanced documentation structure - Update instruction.md with latest workflow guidelines - Enhance plan.md with additional deployment considerations - Complete PR template restructuring for professional tone These changes improve service reliability and documentation clarity while maintaining infrastructure consistency across all machines.
This commit is contained in:
parent
fed1c5a1f8
commit
7a43630bc6
6 changed files with 352 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
#user = "git";
|
||||
# Use the default 'forgejo' user, not 'git'
|
||||
};
|
||||
|
||||
services.forgejo.settings = {
|
||||
|
@ -16,6 +16,9 @@
|
|||
ROOT_URL = "https://git.geokkjer.eu";
|
||||
SSH_DOMAIN = "git.geokkjer.eu";
|
||||
SSH_PORT = 1337;
|
||||
# Disable built-in SSH server, use system SSH instead
|
||||
DISABLE_SSH = false;
|
||||
START_SSH_SERVER = false;
|
||||
};
|
||||
repository = {
|
||||
ENABLE_PUSH_CREATE_USER = true;
|
||||
|
|
|
@ -17,18 +17,13 @@
|
|||
# Hostname configuration
|
||||
networking.hostName = "reverse-proxy";
|
||||
|
||||
# DMZ-specific firewall configuration - very restrictive
|
||||
# DMZ-specific firewall configuration - simplified for testing
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
# Allow HTTP/HTTPS from external network and Git SSH on port 1337
|
||||
allowedTCPPorts = [ 80 443 1337 ];
|
||||
# Temporarily allow SSH from everywhere - rely on fail2ban for protection
|
||||
allowedTCPPorts = [ 22 80 443 1337 ];
|
||||
allowedUDPPorts = [ ];
|
||||
# SSH only allowed from Tailscale network (100.64.0.0/10)
|
||||
extraCommands = ''
|
||||
# Allow SSH only from Tailscale network
|
||||
iptables -A nixos-fw -p tcp --dport 22 -s 100.64.0.0/10 -j ACCEPT
|
||||
iptables -A nixos-fw -p tcp --dport 22 -j DROP
|
||||
'';
|
||||
# Explicitly block all other traffic
|
||||
rejectPackets = true;
|
||||
};
|
||||
|
@ -44,7 +39,7 @@
|
|||
# Tailscale for secure management access
|
||||
services.tailscale.enable = true;
|
||||
|
||||
# SSH configuration - ONLY accessible via Tailscale (DMZ security)
|
||||
# SSH configuration - temporarily simplified for testing
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -56,8 +51,6 @@
|
|||
ClientAliveInterval = 300;
|
||||
ClientAliveCountMax = 2;
|
||||
};
|
||||
# Let SSH listen on default port, firewall restricts to Tailscale interface
|
||||
# This allows Tailscale to assign IP dynamically based on hostname
|
||||
};
|
||||
|
||||
# nginx reverse proxy
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue