Anthony Rodriguez
61537d4722
commitb761f7218b
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 18:03:43 2024 +0200 system/services/searx: setup default search settings commitc58816d17a
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 17:38:06 2024 +0200 browsers/firefox: switch to my own searx commit006daa6ebc
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 17:35:17 2024 +0200 system/services/forgejo: enable on ipv4 commit6c75a3644f
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 17:35:05 2024 +0200 system/services: add searx commitd472424a4e
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 13:22:36 2024 +0200 system/services: add forgejo commit43e754db72
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 23 11:25:01 2024 +0200 hosts/anastacia: init with generated configuration
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
srv = config.services.forgejo.settings.server;
|
|
in {
|
|
services = {
|
|
forgejo = {
|
|
enable = true;
|
|
package = pkgs.forgejo;
|
|
lfs.enable = true;
|
|
database.type = "postgres";
|
|
dump = {
|
|
enable = true;
|
|
type = "tar.xz";
|
|
};
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git.nezia.dev";
|
|
HTTP_PORT = 1849;
|
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
|
HTTP_ADDR = "localhost";
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
federation = {
|
|
ENABLED = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
caddy = {
|
|
enable = true;
|
|
virtualHosts."git.nezia.dev".extraConfig = ''
|
|
reverse_proxy * localhost:${toString srv.HTTP_PORT}
|
|
'';
|
|
};
|
|
};
|
|
|
|
networking.firewall = {
|
|
enable = true;
|
|
allowedTCPPorts = [80 443];
|
|
|
|
# If you're using nftables (default in newer NixOS)
|
|
extraForwardRules = ''
|
|
ip6 saddr { ::/0 } accept
|
|
'';
|
|
};
|
|
|
|
# Ensure IPv6 is enabled
|
|
networking.enableIPv6 = true;
|
|
}
|