diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 492c669f180a..1f47dba411ac 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -9,6 +9,8 @@ let toml = pkgs.formats.toml {}; yaml = pkgs.formats.yaml {}; + git = cfg.packages.gitaly.git; + postgresqlPackage = if config.services.postgresql.enable then config.services.postgresql.package else @@ -51,7 +53,7 @@ let prometheus_listen_addr = "localhost:9236" [git] - bin_path = "${pkgs.git}/bin/git" + bin_path = "${git}/bin/git" [gitlab-shell] dir = "${cfg.packages.gitlab-shell}" @@ -184,16 +186,15 @@ let MALLOC_ARENA_MAX = "2"; } // cfg.extraEnv; - runtimeDeps = with pkgs; [ + runtimeDeps = [ git ] ++ (with pkgs; [ nodejs gzip - git gnutar postgresqlPackage coreutils procps findutils # Needed for gitlab:cleanup:orphan_job_artifact_files - ]; + ]); gitlab-rake = pkgs.stdenv.mkDerivation { name = "gitlab-rake"; @@ -1124,7 +1125,7 @@ in { } ]; - environment.systemPackages = [ pkgs.git gitlab-rake gitlab-rails cfg.packages.gitlab-shell ]; + environment.systemPackages = [ gitlab-rake gitlab-rails cfg.packages.gitlab-shell ]; systemd.targets.gitlab = { description = "Common target for all GitLab services."; @@ -1295,12 +1296,11 @@ in { systemd.services.gitlab-config = { wantedBy = [ "gitlab.target" ]; partOf = [ "gitlab.target" ]; - path = with pkgs; [ + path = [ git ] ++ (with pkgs; [ jq openssl replace-secret - git - ]; + ]); serviceConfig = { Type = "oneshot"; User = cfg.user; @@ -1458,9 +1458,8 @@ in { SIDEKIQ_MEMORY_KILLER_GRACE_TIME = cfg.sidekiq.memoryKiller.graceTime; SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT = cfg.sidekiq.memoryKiller.shutdownWait; }); - path = with pkgs; [ + path = [ git ] ++ (with pkgs; [ postgresqlPackage - git ruby openssh nodejs @@ -1473,7 +1472,7 @@ in { gzip procps # Sidekiq MemoryKiller - ]; + ]); serviceConfig = { Type = "simple"; User = cfg.user; @@ -1500,12 +1499,11 @@ in { bindsTo = [ "gitlab-config.service" ]; wantedBy = [ "gitlab.target" ]; partOf = [ "gitlab.target" ]; - path = with pkgs; [ + path = [ git ] ++ (with pkgs; [ openssh - git gzip bzip2 - ]; + ]); serviceConfig = { Type = "simple"; User = cfg.user; @@ -1582,7 +1580,7 @@ in { after = [ "network.target" ]; wantedBy = [ "gitlab.target" ]; partOf = [ "gitlab.target" ]; - path = with pkgs; [ + path = [ git ] ++ (with pkgs; [ remarshal exiftool git @@ -1590,7 +1588,7 @@ in { gzip openssh cfg.packages.gitlab-workhorse - ]; + ]); serviceConfig = { Type = "simple"; User = cfg.user; @@ -1658,15 +1656,14 @@ in { requiredBy = [ "gitlab.target" ]; partOf = [ "gitlab.target" ]; environment = gitlabEnv; - path = with pkgs; [ + path = [ git ] ++ (with pkgs; [ postgresqlPackage - git openssh nodejs procps gnupg gzip - ]; + ]); serviceConfig = { Type = "notify"; User = cfg.user;