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