Compare commits
3 Commits
ce9933abe1
...
007038f1be
Author | SHA1 | Date | |
---|---|---|---|
007038f1be | |||
ed93ea978e | |||
1dd6397914 |
@ -1,5 +1,6 @@
|
||||
{config, ...}: let
|
||||
domain = "git.deku.moe";
|
||||
sshDomain = "git-ssh.deku.moe";
|
||||
httpPort = 3001;
|
||||
sshPort = 22022;
|
||||
in {
|
||||
@ -9,16 +10,6 @@ in {
|
||||
group = config.services.gitea.user;
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [config.services.gitea.user];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = config.services.gitea.database.user;
|
||||
ensureDBOwnership = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
@ -27,6 +18,7 @@ in {
|
||||
database = {
|
||||
type = "postgres";
|
||||
passwordFile = config.age.secrets.gitea.path;
|
||||
name = config.services.gitea.user;
|
||||
user = config.services.gitea.user;
|
||||
};
|
||||
|
||||
@ -42,6 +34,7 @@ in {
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
HTTP_PORT = httpPort;
|
||||
ROOT_URL = "https://${domain}/";
|
||||
SSH_DOMAIN = sshDomain;
|
||||
SSH_PORT = sshPort;
|
||||
};
|
||||
service = {
|
||||
@ -64,6 +57,15 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
users.users.git = {
|
||||
description = "Gitea Service";
|
||||
home = config.services.gitea.stateDir;
|
||||
useDefaultShell = true;
|
||||
group = "git";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.git = {};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
email = "chinmaydpai@gmail.com";
|
||||
|
Loading…
Reference in New Issue
Block a user