feat(luna): migrate fully to gitea

This commit is contained in:
Price Hiller 2024-01-31 20:03:40 -06:00
parent 895415c380
commit bef123dfcf
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
5 changed files with 36 additions and 6 deletions

View File

@ -1,2 +1,2 @@
* TODO Luna * TODO Luna
- [ ] Get a Gitea actions runner up for the new git server - [X] Get a Gitea actions runner up for the new git server

View File

@ -1,7 +1,7 @@
{ config, specialArgs, fqdn, ... }: { config, specialArgs, fqdn, ... }:
let let
gitlab_home = "/var/lib/gitlab"; gitlab_home = "/var/lib/gitlab";
gitlab_host = "gitlab.${fqdn}"; gitlab_host = "gitlab.old.${fqdn}";
in in
{ {
environment.persistence.save.directories = [ environment.persistence.save.directories = [
@ -29,6 +29,9 @@ in
"${gitlab_home}/logs:/var/log/gitlab" "${gitlab_home}/logs:/var/log/gitlab"
"${gitlab_home}/data:/var/opt/gitlab" "${gitlab_home}/data:/var/opt/gitlab"
]; ];
environment = {
GITLAB_OMNIBUS_CONFIG="external_url 'https://${gitlab_host}'; nginx['listen_https'] = false;";
};
extraOptions = [ extraOptions = [
"--shm-size=256m" "--shm-size=256m"
"--hostname=${gitlab_host}" "--hostname=${gitlab_host}"

View File

@ -21,7 +21,7 @@ in {
}; };
gitea = { gitea = {
appName = "Price Hiller's Git Repositories"; appName = "Gitea";
enable = true; enable = true;
dump.enable = true; dump.enable = true;
database = { database = {
@ -53,12 +53,25 @@ in {
"repository.upload".FILE_MAX_SIZE = 1024; "repository.upload".FILE_MAX_SIZE = 1024;
}; };
}; };
# gitea-actions-runner.instances = { gitea-actions-runner.instances = {
# default = {
# }; enable = true;
url = config.services.gitea.settings.server.ROOT_URL;
tokenFile = config.age.secrets.gitea-runner-token.path;
name = "Default";
settings = {
runner.capacity = 8;
};
labels = [
"alpine:docker://alpine:latest"
"debian:docker://debian:latest"
];
};
};
nginx.virtualHosts."${gitea_host}" = { nginx.virtualHosts."${gitea_host}" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
serverAliases = [ "gitlab.${fqdn}" ];
locations."/".proxyPass = locations."/".proxyPass =
"http://${config.services.gitea.settings.server.HTTP_ADDR}:${ "http://${config.services.gitea.settings.server.HTTP_ADDR}:${
builtins.toString config.services.gitea.settings.server.HTTP_PORT builtins.toString config.services.gitea.settings.server.HTTP_PORT

View File

@ -12,6 +12,7 @@ let
root-pw = "${secrets}/root-hash-pw.age"; root-pw = "${secrets}/root-hash-pw.age";
gitlab-runner-reg-config = "${secrets}/gitlab-runner-reg-config.age"; gitlab-runner-reg-config = "${secrets}/gitlab-runner-reg-config.age";
gitea-db-pass = "${secrets}/gitea-db-pass.age"; gitea-db-pass = "${secrets}/gitea-db-pass.age";
gitea-runner-token = "${secrets}/gitea-runner-token.age";
}; };
}; };
in in

View File

@ -0,0 +1,13 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IDFmRzBvdyBlUHdp
cVNLL1JFQklDckkzL0U3a0FDUVZOZWhwZG1naVJqNVpoRVd5cmpZCmwwQ2ZvaUNj
Nlh1MFNGYU1JYlAxT0pUdkoxci9FTmJsZ1lSRDZkY3pPWjAKLT4gcGl2LXAyNTYg
ckpzMUhBIEFocExaRzlJRTBraGExcU1SeDlwc0doeFg0bVM2UTcyMmM5M0dCd0FW
RWdhCnQxRkxTMGsrR3NCMXpUK1cwWnloL21qUHZqSFU3bWxFS0VkclpYWXBnbFEK
LT4gTShmXXkvUS1ncmVhc2UgNzVuKF4mMyArPCV3eUcgMmBERXtCKFIKSDF3bC9S
ck12T2hJTVpoR0svcnlqVVBMYk1zc0tSdGlQL012T1hZYm1veGJSSVAveU15dFJH
V3FRK0NmZXF1UwpaR25sTUhEZUJRaFQxbTF2cGFCUUJIdEZ4a1l1NFlGRHlzQ0RO
NkFOcnhvVAotLS0geGp3WVlLUjg1RnB0cnB2MGJoRk9rRkFDcmFsUnpXRWhkekpP
cWRpLzZiQQrrB7VhL4u7FMMZeSI9ruONPo9wpa77+JH8y/g8Dm5ORaxp+OAOihAP
D25jGbe5+KgTU/wQb5piJLAB2PyBl+2z57RXPXquZ9eJ85L+rb00
-----END AGE ENCRYPTED FILE-----