From 49aa07fa63fa489ad4f3b0ff9fc34f36bb630fd6 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Sat, 8 Feb 2025 14:59:19 -0500 Subject: atlas: use forgejo for git server --- systems/atlas/default.nix | 12 +----------- systems/atlas/forgejo.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 systems/atlas/forgejo.nix (limited to 'systems/atlas') diff --git a/systems/atlas/default.nix b/systems/atlas/default.nix index 3ccd4ab..6ed10b8 100644 --- a/systems/atlas/default.nix +++ b/systems/atlas/default.nix @@ -3,6 +3,7 @@ imports = [ (modulesPath + "/profiles/minimal.nix") ./hardware-configuration.nix + ./forgejo.nix ./miniflux.nix ./moyai.nix ./nginx.nix @@ -25,16 +26,5 @@ nixpkgs.hostPlatform = "aarch64-linux"; - services = { - github-mirror = { - enable = true; - hostname = "git.getchoo.com"; - mirroredUsers = [ - "getchoo" - "getchoo-archive" - ]; - }; - }; - system.stateVersion = "23.05"; } diff --git a/systems/atlas/forgejo.nix b/systems/atlas/forgejo.nix new file mode 100644 index 0000000..719ea7c --- /dev/null +++ b/systems/atlas/forgejo.nix @@ -0,0 +1,17 @@ +{ config, ... }: + +let + forgejoCfg = config.services.forgejo; +in + +{ + mixins.forgejo.enable = true; + + services.nginx.virtualHosts = { + "git.getchoo.com" = { + locations."/" = { + proxyPass = "http://unix:${forgejoCfg.settings.server.HTTP_ADDR}"; + }; + }; + }; +} -- cgit v1.2.3