catarina: change gitea user
This commit is contained in:
parent
a51b445706
commit
785dc9c67c
@ -1,5 +1,5 @@
|
|||||||
{ config, pkgs, lib, inputs, self, ... }:
|
{ config, pkgs, lib, inputs, self, ... }:
|
||||||
{
|
rec {
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
imports = [ ./hardware.nix ./users.nix ];
|
imports = [ ./hardware.nix ./users.nix ];
|
||||||
@ -136,18 +136,22 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
authentication = ''
|
authentication = ''
|
||||||
# Type Database DB-User Auth-Method Ident-Map(optional)
|
# Type Database DB-User Auth-Method Ident-Map(optional)
|
||||||
local gitea all ident map=gitea-users
|
local git all ident map=gitea-users
|
||||||
'';
|
'';
|
||||||
identMap = ''
|
identMap = ''
|
||||||
# MapName System-User DB-User
|
# MapName System-User DB-User
|
||||||
gitea-users gitea gitea
|
gitea-users git git
|
||||||
'';
|
'';
|
||||||
ensureDatabases = [ "gitea" ];
|
ensureDatabases = [ "git" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
user = "git";
|
||||||
|
group = "gitea";
|
||||||
|
stateDir = "/var/lib/gitea";
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
DOMAIN = "vcs.elnafo.ru";
|
DOMAIN = "vcs.elnafo.ru";
|
||||||
@ -160,7 +164,7 @@
|
|||||||
|
|
||||||
mailer = {
|
mailer = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
FROM = "gitea@elnafo.ru";
|
FROM = "git@elnafo.ru";
|
||||||
};
|
};
|
||||||
|
|
||||||
service.DISABLE_REGISTRATION = true;
|
service.DISABLE_REGISTRATION = true;
|
||||||
@ -174,8 +178,8 @@
|
|||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
passwordFile = "/var/lib/secrets/gitea/gitea-dbpassword";
|
passwordFile = "/var/lib/secrets/gitea/gitea-dbpassword";
|
||||||
name = "gitea";
|
name = "git";
|
||||||
user = "gitea";
|
user = "git";
|
||||||
};
|
};
|
||||||
|
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
@ -183,6 +187,14 @@
|
|||||||
appName = "Elnafo VCS";
|
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;
|
services.spoofdpi.enable = true;
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
|
Loading…
Reference in New Issue
Block a user