diff options
author | WilliButz <wbutz@cyberfnord.de> | 2018-06-13 19:34:48 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-09-25 03:53:32 +0200 |
commit | 78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565 (patch) | |
tree | 3c5255f077df50efe9fc2ab52fd76967a96c9e14 /nixos | |
parent | dc915565bafbce4ecd0f2ad3011257e676068a45 (diff) | |
download | nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar.gz nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar.bz2 nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar.lz nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar.xz nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.tar.zst nixlib-78ad8d4a6242c9baab4b08ee9d0b2ab94b8ed565.zip |
nixos/gitlab: rebuild authorized_keys during preStart
This updates the path to the 'gitlab-shell' to the correct store path when gitlab is restarted.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/misc/gitlab.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index fe2dd2798bff..d81aa5643e53 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -630,6 +630,10 @@ in { touch "${cfg.statePath}/db-seeded" fi + # The gitlab:shell:setup regenerates the authorized_keys file so that + # the store path to the gitlab-shell in it gets updated + ${pkgs.sudo}/bin/sudo -u ${cfg.user} force=yes ${gitlab-rake}/bin/gitlab-rake gitlab:shell:setup RAILS_ENV=production + # The gitlab:shell:create_hooks task seems broken for fixing links # so we instead delete all the hooks and create them anew rm -f ${cfg.statePath}/repositories/**/*.git/hooks |