Compare commits
3 commits
1fd6de2551
...
f6eb588ccd
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f6eb588ccd | ||
![]() |
1f222f2997 | ||
![]() |
f2c9eed794 |
6 changed files with 72 additions and 63 deletions
|
@ -92,13 +92,13 @@ Home-lab/
|
||||||
|
|
||||||
### Git/Forgejo Configuration
|
### Git/Forgejo Configuration
|
||||||
- **Primary repository**: Hosted on self-hosted Forgejo instance
|
- **Primary repository**: Hosted on self-hosted Forgejo instance
|
||||||
- **Forgejo URL**: `ssh://forgejo@git.geokkjer.eu:1337/geir/Home-lab.git`
|
- **Forgejo URL**: `ssh://git@git.geokkjer.eu:2222/geir/Home-lab.git`
|
||||||
- **SSH port**: 1337 (proxied through reverse-proxy to grey-area:22)
|
- **SSH port**: 2222 (proxied through reverse-proxy to grey-area:22)
|
||||||
- **User**: Must use `forgejo` user, not `git` user
|
- **User**: Must use `git` user for SSH compatibility
|
||||||
- **GitHub mirror**: `git@github.com:geokkjer/Home-lab.git` (secondary/backup)
|
- **GitHub mirror**: `git@github.com:geokkjer/Home-lab.git` (secondary/backup)
|
||||||
- **Remote configuration**:
|
- **Remote configuration**:
|
||||||
```bash
|
```bash
|
||||||
git remote add origin ssh://forgejo@git.geokkjer.eu:1337/geir/Home-lab.git
|
git remote add origin ssh://git@git.geokkjer.eu:2222/geir/Home-lab.git
|
||||||
git remote add github git@github.com:geokkjer/Home-lab.git
|
git remote add github git@github.com:geokkjer/Home-lab.git
|
||||||
```
|
```
|
||||||
- **Pushing**: Primary pushes to Forgejo origin, manual sync to GitHub as needed
|
- **Pushing**: Primary pushes to Forgejo origin, manual sync to GitHub as needed
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
services.forgejo = {
|
services.forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Use the default 'forgejo' user, not 'git'
|
user = "git"; # Explicitly set to 'git' user for SSH compatibility
|
||||||
};
|
};
|
||||||
|
|
||||||
services.forgejo.settings = {
|
services.forgejo.settings = {
|
||||||
|
@ -15,10 +15,12 @@
|
||||||
server = {
|
server = {
|
||||||
ROOT_URL = "https://git.geokkjer.eu";
|
ROOT_URL = "https://git.geokkjer.eu";
|
||||||
SSH_DOMAIN = "git.geokkjer.eu";
|
SSH_DOMAIN = "git.geokkjer.eu";
|
||||||
SSH_PORT = 1337;
|
SSH_PORT = 2222;
|
||||||
# Disable built-in SSH server, use system SSH instead
|
# Use system SSH server instead of built-in
|
||||||
DISABLE_SSH = false;
|
DISABLE_SSH = false;
|
||||||
START_SSH_SERVER = false;
|
START_SSH_SERVER = false;
|
||||||
|
# Configure SSH user
|
||||||
|
SSH_USER = "git";
|
||||||
};
|
};
|
||||||
repository = {
|
repository = {
|
||||||
ENABLE_PUSH_CREATE_USER = true;
|
ENABLE_PUSH_CREATE_USER = true;
|
||||||
|
|
|
@ -19,9 +19,9 @@
|
||||||
# DMZ-specific firewall configuration - simplified for testing
|
# DMZ-specific firewall configuration - simplified for testing
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Allow HTTP/HTTPS from external network and Git SSH on port 1337
|
# Allow HTTP/HTTPS from external network and Git SSH on port 2222
|
||||||
# Temporarily allow SSH from everywhere - rely on fail2ban for protection
|
# Temporarily allow SSH from everywhere - rely on fail2ban for protection
|
||||||
allowedTCPPorts = [ 22 80 443 1337 ];
|
allowedTCPPorts = [ 22 80 443 2222 ];
|
||||||
allowedUDPPorts = [ ];
|
allowedUDPPorts = [ ];
|
||||||
# Explicitly block all other traffic
|
# Explicitly block all other traffic
|
||||||
rejectPackets = true;
|
rejectPackets = true;
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 1337;
|
listen 2222;
|
||||||
proxy_pass git_ssh_backend;
|
proxy_pass git_ssh_backend;
|
||||||
proxy_timeout 300s;
|
proxy_timeout 300s;
|
||||||
proxy_connect_timeout 10s;
|
proxy_connect_timeout 10s;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Base system packages and aliases shared across all machines
|
# Base system packages and aliases shared across all machines
|
||||||
# This module consolidates common CLI tools to reduce duplication
|
# This module consolidates common CLI tools to reduce duplication
|
||||||
# across user configurations and machine-specific configs
|
# across user configurations and machine-specific configs
|
||||||
|
@ -34,6 +37,8 @@
|
||||||
zellij
|
zellij
|
||||||
glances
|
glances
|
||||||
systemctl-tui
|
systemctl-tui
|
||||||
|
starship # Shell prompt
|
||||||
|
btop # Resource monitor (better top)
|
||||||
|
|
||||||
# Text processing and utilities
|
# Text processing and utilities
|
||||||
jq # JSON processor
|
jq # JSON processor
|
||||||
|
|
0
modules/common/emacs.nix
Normal file
0
modules/common/emacs.nix
Normal file
|
@ -1,8 +1,10 @@
|
||||||
# Common User Configuration
|
# Common User Configuration
|
||||||
# Shared settings for all users in the home lab
|
# Shared settings for all users in the home lab
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Common user settings
|
# Common user settings
|
||||||
users = {
|
users = {
|
||||||
# Use mutable users for flexibility
|
# Use mutable users for flexibility
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
|
|
||||||
# direnv integration
|
# direnv integration
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
|
eval "$(starship init zsh)"
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -86,7 +89,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Enable sound
|
# Enable sound
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue