From 01ebf66bcc8387619088a2abfed63db5a663fd8b Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Fri, 15 Nov 2024 22:18:48 +0100 Subject: [PATCH] add user forgejo --- configuration.nix | 2 ++ forgejo.nix | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configuration.nix b/configuration.nix index bfd0cfe..bfb8626 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,4 +13,6 @@ git tig wget ]; + +# networking.firewall.enable = false; } diff --git a/forgejo.nix b/forgejo.nix index ced75f7..bb35389 100644 --- a/forgejo.nix +++ b/forgejo.nix @@ -3,8 +3,6 @@ let srv = config.services.forgejo.settings.server; in { - networking.firewall.enable = false; - services.nginx = { virtualHosts.${config.services.forgejo.settings.server.DOMAIN} = { forceSSL = true; @@ -16,6 +14,14 @@ in }; }; + users.groups.forgejo = {}; + users.users.forgejo = { + isSystemUser = true; + useDefaultShell = true; + group = "forgejo"; + home = config.services.forgejo.stateDir; + }; + services.forgejo = { enable = true; database.type = "postgres";