add gitlab

This commit is contained in:
zackartz 2024-05-05 21:24:08 -04:00
parent 47c3be2ab5
commit 5d7affba07
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
6 changed files with 66 additions and 1 deletions

View file

@ -1,4 +1,35 @@
{
services.gitlab = {
config,
pkgs,
...
}: let
sec = config.age.secrets;
in {
age.secrets = {
gitlab_db.file = ../../../sec/gitlab_db.age;
gitlab_initpw.file = ../../../src/gitlab_initpw.age;
gitlab_otp.file = ../../../sec/gitlab_otp.age;
gitlab_pw.file = ../../../sec/gitlab_pw.age;
gitlab_sec.file = ../../../sec/gitlab_sec.age;
};
services.gitlab = {
enable = true;
databasePasswordFile = sec.gitlab_db.path;
initialRootPasswordFile = sec.gitlab_initpw.path;
secrets = {
secretFile = sec.gitlab_sec.path;
otpFile = sec.gitlab_otp.path;
dbFile = sec.gitlab_db.path;
jwsFile = pkgs.runCommand "oidcKeyBase" {} "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
};
};
services.nginx.virtualHosts."git.zackmyers.io" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
};
systemd.services.gitlab-backup.environment.BACKUP = "dump";
}