From f43ba01ee651d8612b0329b6f66218f1f5461d32 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 6 Feb 2024 12:19:45 +0100 Subject: [PATCH] feat: use forgejo NixOS module with gitea user https://nixos.org/manual/nixos/stable/#module-forgejo-migration-gitea --- hosts/nachtigall/apps/forgejo.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/hosts/nachtigall/apps/forgejo.nix b/hosts/nachtigall/apps/forgejo.nix index b12cef6..e455706 100644 --- a/hosts/nachtigall/apps/forgejo.nix +++ b/hosts/nachtigall/apps/forgejo.nix @@ -32,13 +32,26 @@ }; }; - services.gitea = { + users.users.gitea = { + home = "/var/lib/forgejo"; + useDefaultShell = true; + group = "gitea"; + isSystemUser = true; + }; + + users.groups.gitea = {}; + + services.forgejo = { enable = true; + user = "gitea"; + group = "gitea"; package = pkgs.forgejo; appName = "pub.solar git server"; database = { type = "postgres"; passwordFile = config.age.secrets.forgejo-database-password.path; + name = "gitea"; + user = "gitea"; }; stateDir = "/var/lib/forgejo"; lfs.enable = true;