2022-10-10 13:03:08 +01:00
|
|
|
{config, ...}: {
|
2021-04-28 23:02:27 +01:00
|
|
|
users = {
|
|
|
|
extraUsers.gitea = {
|
|
|
|
uid = config.ids.uids.git;
|
|
|
|
isSystemUser = true;
|
|
|
|
description = "Gitea Service";
|
|
|
|
group = config.users.extraGroups.gitea.name;
|
|
|
|
};
|
2022-10-10 13:03:08 +01:00
|
|
|
extraGroups.gitea = {gid = config.ids.gids.git;};
|
2021-04-28 23:02:27 +01:00
|
|
|
};
|
|
|
|
|
2021-04-12 01:41:31 +01:00
|
|
|
virtualisation.pods.gitea = {
|
|
|
|
hostname = "gitea.tlater.net";
|
2022-10-10 13:03:08 +01:00
|
|
|
publish = ["3000:3000" "2221:2221"];
|
2021-05-16 00:40:09 +01:00
|
|
|
network = "slirp4netns";
|
2021-04-12 01:41:31 +01:00
|
|
|
|
|
|
|
containers = {
|
|
|
|
gitea = {
|
|
|
|
image = "gitea/gitea:latest";
|
2022-10-10 13:03:08 +01:00
|
|
|
volumes = ["gitea:/data:Z" "/etc/localtime:/etc/localtime:ro"];
|
|
|
|
dependsOn = ["postgres"];
|
2021-04-12 01:41:31 +01:00
|
|
|
|
|
|
|
environment = {
|
|
|
|
DB_TYPE = "postgres";
|
2022-01-08 00:27:01 +00:00
|
|
|
DB_HOST = "localhost:5432";
|
2021-04-12 01:41:31 +01:00
|
|
|
DB_NAME = "gitea";
|
|
|
|
DB_USER = "gitea";
|
|
|
|
|
2021-04-28 23:02:27 +01:00
|
|
|
USER_UID = toString config.users.extraUsers.gitea.uid;
|
|
|
|
USER_GID = toString config.users.extraGroups.gitea.gid;
|
|
|
|
|
2021-04-12 01:41:31 +01:00
|
|
|
RUN_MODE = "prod";
|
|
|
|
DOMAIN = "gitea.tlater.net";
|
|
|
|
SSH_PORT = "2221";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
postgres = {
|
|
|
|
image = "postgres:alpine";
|
|
|
|
environment = {
|
|
|
|
POSTGRES_DB = "gitea";
|
|
|
|
POSTGRES_USER = "gitea";
|
|
|
|
};
|
2022-10-10 13:03:08 +01:00
|
|
|
volumes = ["gitea-postgres-14:/var/lib/postgresql/data"];
|
2021-04-12 01:41:31 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|