aboutsummaryrefslogtreecommitdiff
path: root/hosts/sagittarius/web
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/sagittarius/web')
-rw-r--r--hosts/sagittarius/web/git.nix66
1 files changed, 20 insertions, 46 deletions
diff --git a/hosts/sagittarius/web/git.nix b/hosts/sagittarius/web/git.nix
index 816c65a..022d2b3 100644
--- a/hosts/sagittarius/web/git.nix
+++ b/hosts/sagittarius/web/git.nix
@@ -1,55 +1,29 @@
-{ pkgs, config, ... }:
+{ config, ... }:
let
- cfg = config.services.forgejo;
- srv = cfg.settings.server;
+ secrets = config.sops.secrets;
+ domain = "git.sorre.internal";
in
{
- # services.nginx = {
- # enable = true;
- # virtualHosts.${cfg.settings.server.DOMAIN} = {
- # forceSSL = true;
- # enableACME = true;
- # extraConfig = ''
- # client_max_body_size 512M;
- # '';
- # locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
- # };
- # };
-
- services.forgejo = {
+ services.nginx = {
enable = true;
- package = pkgs.forgejo;
- database.type = "sqlite3";
- settings = {
- server = {
- DOMAIN = "git.sorre.xyz";
- # You need to specify this to remove the port from URLs in the web UI.
- ROOT_URL = "https://${srv.DOMAIN}/";
- HTTP_PORT = 3000;
- };
- # You can temporarily allow registration to create an admin user.
- service.DISABLE_REGISTRATION = true;
-
- # Add support for actions, based on act: https://github.com/nektos/act
- actions = {
- ENABLED = true;
- DEFAULT_ACTIONS_URL = "https://code.forgejo.org";
- };
+ virtualHosts."${domain}" = {
+ forceSSL = true;
+ sslCertificateKey = secrets."wg-ca-key".path;
+ sslCertificate = secrets."wg-ca-crt".path;
+ listen = [
+ {
+ addr = "100.64.0.3";
+ port = 443;
+ ssl = true;
+ }
+ ];
};
};
- services.gitea-actions-runner = {
- package = pkgs.forgejo-runner;
- instances.default = {
- enable = true;
- name = "monolith";
- url = "https://git.sorre.xyz";
- tokenFile = config.sops.secrets."forgejo-runner-token".path;
-
- labels = [
- "ubuntu-24.04:docker://ubuntu:24.04"
- "docker:docker://node:current-trixie"
- ];
- };
+ services.cgit.internal = {
+ enable = true;
+ scanPath = "/var/lib/git";
+ nginx.virtualHost = domain;
+ gitHttpBackend.checkExportOkFiles = false;
};
}