summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorseth <[email protected]>2023-07-04 00:07:18 -0400
committerseth <[email protected]>2023-07-04 00:07:18 -0400
commit0d4a5e97a48f01980ef17b15b815fb27e48d7589 (patch)
tree859c407df9da9b5bcb885eb96127304009fce961 /hosts
parentc42a86ebf08b2bf834f598bb17278f9f5ace90ba (diff)
p-body: stop hosting forgejo
Diffstat (limited to 'hosts')
-rw-r--r--hosts/p-body/default.nix1
-rw-r--r--hosts/p-body/forgejo.nix69
2 files changed, 0 insertions, 70 deletions
diff --git a/hosts/p-body/default.nix b/hosts/p-body/default.nix
index 3096199..ea03d42 100644
--- a/hosts/p-body/default.nix
+++ b/hosts/p-body/default.nix
@@ -8,7 +8,6 @@
imports = [
(modulesPath + "/virtualisation/digital-ocean-image.nix")
./buildMachines.nix
- ./forgejo.nix
./grafana.nix
./loki.nix
./nginx.nix
diff --git a/hosts/p-body/forgejo.nix b/hosts/p-body/forgejo.nix
deleted file mode 100644
index 8a5dc90..0000000
--- a/hosts/p-body/forgejo.nix
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- config,
- lib,
- pkgs,
- nixpkgs,
- ...
-}: let
- theme = pkgs.fetchzip {
- url = "https://github.com/catppuccin/gitea/releases/download/v0.2.1/catppuccin-gitea.tar.gz";
- sha256 = "sha256-HqVLW58lKPn81p3gTSjzkACHSBbmqPqeobAlJMubb8Y=";
- stripRoot = false;
- };
-in {
- users.users.forgejo = {
- useDefaultShell = true;
- home = "/var/lib/gitea";
- group = "gitea";
- isSystemUser = true;
- };
-
- services.gitea = let
- domain = "git.${config.networking.domain}";
- in {
- enable = true;
- package = (import nixpkgs {inherit (pkgs) system;}).forgejo;
- appName = "forgejo: with daddy issues";
- user = "forgejo";
- database.user = "forgejo";
-
- settings = {
- indexer.REPO_INDEXER_ENABLED = true;
- session = {
- COOKIE_SECURE = true;
- PROVIDER = "db";
- SAME_SITE = "strict";
- };
-
- service.DISABLE_REGISTRATION = true;
-
- server = {
- BUILTIN_SSH_USER = "forgejo";
- DOMAIN = domain;
- ENABLE_GZIP = true;
- HTTP_ADDR = "127.0.0.1";
- ROOT_URL = "https://${domain}/";
- SSH_AUTHORIZED_KEYS_BACKUP = false;
- SSH_DOMAIN = domain;
- };
-
- ui = {
- THEMES =
- builtins.concatStringsSep
- ","
- (["auto"]
- ++ (map (name: lib.removePrefix "theme-" (lib.removeSuffix ".css" name))
- (builtins.attrNames (builtins.readDir theme))));
- DEFAULT_THEME = "catppuccin-mocha-pink";
- };
- };
- };
-
- systemd.services.gitea = {
- preStart = lib.mkAfter ''
- rm -rf ${config.services.gitea.stateDir}/custom/public
- mkdir -p ${config.services.gitea.stateDir}/custom/public
- ln -sf ${theme} ${config.services.gitea.stateDir}/custom/public/css
- '';
- };
-}