gitlab option added

This commit is contained in:
Birk Bohne 2025-07-14 16:03:53 +02:00
parent debb28721e
commit 90bd3afa1b
No known key found for this signature in database
4 changed files with 70 additions and 1 deletions

View File

@ -7,7 +7,7 @@
software = {
desktop = true;
nextcloud.server.enable = true;
gitlab.enable = true;
gitlab = true;
};
disk.device.name = "vda";
hardware.virtualmachine.type = "kvm";

View File

@ -38,6 +38,7 @@
imports = [
./firmware.nix
./gnome.nix
./gitlab.nix
./nextcloud.nix
./nix-daemon.nix
./openssh.nix

64
software/gitlab.nix Normal file
View File

@ -0,0 +1,64 @@
{
config,
lib,
...
}:
{
config = lib.mkIf (config.beancloud.software.gitlab) {
beancloud.network.nat = true;
containers.gitlab = {
autoStart = true;
privateNetwork = true;
hostAddress = "192.168.100.10";
localAddress = "192.168.100.11";
config =
{
pkgs,
lib,
...
}:
{
system.stateVersion = "25.05";
systemd.services.gitlab-backup.environment.BACKUP = "dump";
networking = {
firewall = {
enable = true;
allowedTCPPorts = [ 80 ];
};
useHostResolvConf = lib.mkForce false;
};
services = {
resolved.enable = true;
gitlab = {
enable = true;
databasePasswordFile = pkgs.writeText "dbPassword" "bvBgWvctkFzXMVqAlNVyXJYbfJyqIIWF";
initialRootPasswordFile = pkgs.writeText "rootPassword" "demo123456";
secrets = {
secretFile = pkgs.writeText "secret" "EnekUctCqZJIFSyCAFWrYQUGUoJZuJWYyOwRjllSYqMjhTRAoeGBpvEEyGgzStBd";
otpFile = pkgs.writeText "otpsecret" "PyMHBYurnXlxBZnCJIYspJIsJDmRJEdojeBRYqbaruXEphzxWcpjsxhztFBokvCT";
dbFile = pkgs.writeText "dbsecret" "PIZxwIZmZkygBpxfQKLSyoaFmtIxzbmjlOeVSGhROfSqwMAXFwDlhZCGQenuBqOj";
jwsFile = pkgs.runCommand "oidcKeyBase" { } "${pkgs.openssl}/bin/openssl genrsa 2048 > $out";
activeRecordPrimaryKeyFile = pkgs.writeText "secret" "apMkGxzoorreGJlwIJihAywaoioezrKSwZAgrvPbodhsfjfPEWyTabbIdwxFuznv";
activeRecordDeterministicKeyFile = pkgs.writeText "secret" "FYzrCGwVyDmPQTfTsullsFxzkrPHKLfZtekpyKgeyfkvHyGlbuEYcQvEGROyxMIp";
activeRecordSaltFile = pkgs.writeText "secret" "HXgSMPUWTOsIPDwKHxoTDquMEPTSjUTiAxgndnTOWZkXAJySYBrZmbhiCNMtGDAd";
};
backup.startAt = [ "03:00" ];
};
nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
localhost = {
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
};
};
};
openssh.enable = true;
};
};
};
};
}

View File

@ -113,6 +113,10 @@
name = "Nextcloud";
url = "http://localhost";
})
(lib.mkIf osConfig.beancloud.software.gitlab {
name = "Gitlab";
url = "http://192.168.100.11";
})
]];
}
];