flakes/containers/citrine/configuration.nix

52 lines
1.6 KiB
Nix
Raw Normal View History

2026-03-17 17:01:15 +11:00
{ config, fqdn, lib, ... }: {
2026-03-16 00:48:51 +11:00
system.stateVersion = "25.11";
2026-03-16 16:07:08 +11:00
networking.firewall.allowedTCPPorts = [ 22 3000 ];
networking.firewall.allowedUDPPorts = [ 22 3000 ];
2026-03-16 00:48:51 +11:00
systemd.tmpfiles.rules = [
"L+ /persist/forgejo/custom/templates - - - - ${./templates}"
];
2026-03-16 00:48:51 +11:00
services.forgejo = {
enable = true;
lfs.enable = true;
settings = {
DEFAULT.APP_NAME = "Garden";
2026-03-16 00:48:51 +11:00
server = {
2026-03-17 17:01:15 +11:00
DOMAIN = fqdn;
ROOT_URL = "https://${fqdn}/";
2026-03-16 00:48:51 +11:00
HTTP_PORT = 3000;
2026-03-16 16:07:08 +11:00
START_SSH_SERVER = true;
BUILTIN_SSH_SERVER_USER = "git";
SSH_DOMAIN = "git.lava.moe";
SSH_SERVER_KEY_EXCHANGES = "mlkem768x25519-sha256,sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256";
2026-03-16 00:48:51 +11:00
};
2026-03-16 02:32:09 +11:00
ui = lib.mkForce {
DEFAULT_THEME = "catppuccin-maroon-auto";
THEMES = lib.strings.concatMapStringsSep "," (x: "${x}-auto") [
"catppuccin-pink"
"catppuccin-maroon"
"catppuccin-flamingo"
"catppuccin-rosewater"
"forgejo"
"gitea"
];
};
api.ENABLE_SWAGGER = false;
other.SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
service.DISABLE_REGISTRATION = true;
2026-03-16 00:48:51 +11:00
};
stateDir = "/persist/forgejo";
};
2026-03-16 16:07:08 +11:00
systemd.services.forgejo.serviceConfig = {
AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];
CapabilityBoundingSet = [ "CAP_NET_BIND_SERVICE" ];
PrivateUsers = lib.mkForce false;
};
2026-03-16 02:32:09 +11:00
catppuccin.forgejo.enable = true;
environment.systemPackages = [ config.services.forgejo.package ];
2026-03-16 00:48:51 +11:00
}