summary refs log tree commit diff
path: root/nixos/modules/services/misc/gitlab.nix
diff options
context:
space:
mode:
authorTeo Klestrup Röijezon <teo@nullable.se>2018-06-05 21:27:42 +0200
committerRobin Gloster <mail@glob.in>2018-07-30 19:41:12 +0200
commit6c54cfb280fe4f4090f622dc247b76b62fa345dc (patch)
tree20975d56875d759e6f6a8d7e08b317af24ce3be6 /nixos/modules/services/misc/gitlab.nix
parente0983f3eece3b57b4dfa3caede9001a35f4fb782 (diff)
downloadnixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar.gz
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar.bz2
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar.lz
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar.xz
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.tar.zst
nixlib-6c54cfb280fe4f4090f622dc247b76b62fa345dc.zip
nixos/gitlab: don't install pg_trgm for remote hosts
Fixes #41476
Diffstat (limited to 'nixos/modules/services/misc/gitlab.nix')
-rw-r--r--nixos/modules/services/misc/gitlab.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index 9eeb1fe01c55..5bf66354f487 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -612,10 +612,11 @@ in {
             ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} ${config.services.postgresql.package}/bin/createdb --owner ${cfg.databaseUsername} ${cfg.databaseName}
             touch "${cfg.statePath}/db-created"
           fi
+
+          # enable required pg_trgm extension for gitlab
+          ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql ${cfg.databaseName} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
         fi
 
-        # enable required pg_trgm extension for gitlab
-        ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql ${cfg.databaseName} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm"
         # Always do the db migrations just to be sure the database is up-to-date
         ${gitlab-rake}/bin/gitlab-rake db:migrate RAILS_ENV=production