From 5c4642c6b59354313fd207e676810ea33f35b413 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 25 Jan 2024 10:05:55 +0100 Subject: [PATCH] migrate to forgejo the hacky way --- modules/forgejo.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/forgejo.nix b/modules/forgejo.nix index 2084542..b6ca052 100644 --- a/modules/forgejo.nix +++ b/modules/forgejo.nix @@ -1,12 +1,27 @@ -{ pkgs, pkgsUnstable, ... }: { - services.gitea = { + pkgs, + pkgsUnstable, + ... +}: { + users.users.gitea = { + home = "/var/lib/gitea"; + useDefaultShell = true; + group = "gitea"; + isSystemUser = true; + }; + users.groups.gitea = {}; + services.forgejo = { enable = true; package = pkgsUnstable.forgejo; repositoryRoot = "/forgejo/repos"; + stateDir = "/var/lib/gitea"; appName = "Katzenschmiede"; + user = "gitea"; + group = "gitea"; database = { type = "postgres"; + name = "gitea"; + user = "gitea"; }; settings = { openid = { @@ -42,7 +57,7 @@ }; deployment.keys = { "noreply-mail-pw-plain" = { - keyCommand = [ "pass" "mailpws/plain/noreply" ]; + keyCommand = ["pass" "mailpws/plain/noreply"]; destDir = "/var/lib/secrets"; permissions = "0604"; };