catarina: change gitea user

This commit is contained in:
L-Nafaryus 2024-01-16 12:58:07 +05:00
parent a51b445706
commit 785dc9c67c
Signed by: L-Nafaryus
GPG Key ID: 582F8B0866B294A1

View File

@ -1,5 +1,5 @@
{ config, pkgs, lib, inputs, self, ... }:
{
rec {
system.stateVersion = "23.11";
imports = [ ./hardware.nix ./users.nix ];
@ -136,18 +136,22 @@
enable = true;
authentication = ''
# Type Database DB-User Auth-Method Ident-Map(optional)
local gitea all ident map=gitea-users
local git all ident map=gitea-users
'';
identMap = ''
# MapName System-User DB-User
gitea-users gitea gitea
gitea-users git git
'';
ensureDatabases = [ "gitea" ];
ensureDatabases = [ "git" ];
};
services.gitea = {
enable = true;
user = "git";
group = "gitea";
stateDir = "/var/lib/gitea";
settings = {
server = {
DOMAIN = "vcs.elnafo.ru";
@ -160,7 +164,7 @@
mailer = {
ENABLED = true;
FROM = "gitea@elnafo.ru";
FROM = "git@elnafo.ru";
};
service.DISABLE_REGISTRATION = true;
@ -174,8 +178,8 @@
database = {
type = "postgres";
passwordFile = "/var/lib/secrets/gitea/gitea-dbpassword";
name = "gitea";
user = "gitea";
name = "git";
user = "git";
};
lfs.enable = true;
@ -183,6 +187,14 @@
appName = "Elnafo VCS";
};
users.users.${services.gitea.user} = {
description = "Gitea Service";
home = services.gitea.stateDir;
useDefaultShell = true;
group = services.gitea.group;
isSystemUser = true;
};
services.spoofdpi.enable = true;
# Packages