diff --git a/etc/nixos/configuration.nix b/etc/nixos/configuration.nix index 718f33d..ca72431 100644 --- a/etc/nixos/configuration.nix +++ b/etc/nixos/configuration.nix @@ -12,6 +12,7 @@ # and set inside the docker-containers set, instead of setting the # docker-containers set here. ./services/nginx.nix + ./services/gitlab.nix ]; networking = { @@ -63,12 +64,5 @@ autoPrune.enable = true; }; - docker-containers = { - ## Actual service definitions - gitlab = import ./services/gitlab.nix; - - }; - }; - system.stateVersion = "19.09"; } diff --git a/etc/nixos/services/gitlab.nix b/etc/nixos/services/gitlab.nix index 74674a5..60866a4 100644 --- a/etc/nixos/services/gitlab.nix +++ b/etc/nixos/services/gitlab.nix @@ -1,21 +1,25 @@ { ... }: { - image = "gitlab/gitlab-ce:latest"; - ports = [ - "3022:22" - ]; - volumes = [ - "gitlab-data:/var/opt/gitlab:Z" - "gitlab-logs:/var/log/gitlab:Z" - "gitlab-config:/etc/gitlab:Z" - ]; - environment = { - VIRTUAL_HOST = "gitlab.tlater.net"; - LETSENCRYPT_HOST = "gitlab.tlater.net"; - GITLAB_OMNIBUS_CONFIG = builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile ./configs/gitlab.rb); + networked-docker-containers = { + gitlab = { + image = "gitlab/gitlab-ce:latest"; + ports = [ + "3022:22" + ]; + volumes = [ + "gitlab-data:/var/opt/gitlab:Z" + "gitlab-logs:/var/log/gitlab:Z" + "gitlab-config:/etc/gitlab:Z" + ]; + environment = { + VIRTUAL_HOST = "gitlab.tlater.net"; + LETSENCRYPT_HOST = "gitlab.tlater.net"; + GITLAB_OMNIBUS_CONFIG = builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile ./configs/gitlab.rb); + }; + networks = [ + "webproxy" + ]; + }; }; - extraDockerOptions = [ - "--network=webproxy" - ]; }