forjoe migrated, reachable and firewall-whitelisted
This commit is contained in:
parent
5da0bf2720
commit
405964620b
1 changed files with 27 additions and 4 deletions
|
@ -46,7 +46,6 @@
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC7NUaBJOYgMnT2uUUUSB7gKaqqbgxXDghBkRqSGuZrAZzZYHlHH7nM6Re7+yOYMSoJGLaB4iaUDLSBBnyA6pLI= nixos_gitea@secretive.MacBook-Pro-(2).local"
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC7NUaBJOYgMnT2uUUUSB7gKaqqbgxXDghBkRqSGuZrAZzZYHlHH7nM6Re7+yOYMSoJGLaB4iaUDLSBBnyA6pLI= nixos_gitea@secretive.MacBook-Pro-(2).local"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
rclone
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,7 +74,31 @@
|
||||||
};
|
};
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
#enable qemu-guestagent
|
#Forgejo
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
settings.server = {
|
||||||
|
ROOT_URL = "https://git.shibe.pro";
|
||||||
|
DOMAIN = "git.shibe.pro";
|
||||||
|
HTTP_PORT = 48540;
|
||||||
|
OFFLINE_MODE = true; # disable gravatar, CDN
|
||||||
|
};
|
||||||
|
settings.service.DISABLE_REGISTRATION = true;
|
||||||
|
database = {
|
||||||
|
user = "forgejo";
|
||||||
|
passwordFile = "/etc/nixos/forgejo-dbpassword";
|
||||||
|
name = "forgejodb";
|
||||||
|
type = "mysql";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow forgejo user to adjust authorized_keys dynamically
|
||||||
|
services.openssh.extraConfig = ''
|
||||||
|
Match User forgejo
|
||||||
|
AuthorizedKeysFile ${config.users.users.forgejo.home}/.ssh/authorized_keys
|
||||||
|
'';
|
||||||
|
|
||||||
|
#enable qemu-guestagent
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
# Disable password checking for wheel group users so we can solely rely on ssh keys
|
# Disable password checking for wheel group users so we can solely rely on ssh keys
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
@ -83,9 +106,9 @@
|
||||||
# Firewall stuff:
|
# Firewall stuff:
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
services.samba.openFirewall = true;
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
networking.firewall.allowedTCPPorts = [48540 ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
Loading…
Reference in a new issue