NixOS Containers: Improved
Add personal containers module Move gitlab into new containers Move matrix onto Isaiah
This commit is contained in:
+4
-24
@@ -31,25 +31,10 @@ in {
|
||||
|
||||
system.activationScripts.makeGitlabDir = lib.stringAfter [ "var" ] "mkdir -p ${gitlabStateDir} && touch ${gitlabStateDir}/touch";
|
||||
|
||||
containers.gitlab = container {
|
||||
autoStart = true;
|
||||
bindMounts = {
|
||||
"/var/gitlab/state" = {
|
||||
hostPath = gitlabStateDir;
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/dev/net/tun" = {
|
||||
hostPath = "/dev/net/tun";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
forwardPorts = [{
|
||||
hostPort = 2222;
|
||||
containerPort = 22;
|
||||
}];
|
||||
hostAddress = "192.168.200.1";
|
||||
localAddress = "192.168.200.2";
|
||||
config = ((import ./container-git.nix) { inherit inputs; });
|
||||
greg.containers.gitlab = {
|
||||
tailscale = true;
|
||||
subnet = "200";
|
||||
builder = (import ./container-git.nix);
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
@@ -80,11 +65,6 @@ in {
|
||||
];
|
||||
};
|
||||
};
|
||||
"container@gitlab".serviceConfig = {
|
||||
DeviceAllow = [ "/dev/net/tun" ];
|
||||
ProtectKernelModules = false;
|
||||
PrivateDevices = false;
|
||||
};
|
||||
gitlab-runner.serviceConfig.EnvironmentFile = config.age.secrets.docker-auth.path;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user