Skip to content

Commit

Permalink
nixos/gitolite: don't leak nix store hash into gitolite-admin usernam…
Browse files Browse the repository at this point in the history
…e/key

It doesn't look good when the initial admin user is named
"<hash>-gitolite-admin" and the key stored as
"<hash>-gitolite-admin.pub". Instead, make it simply "gitolite-admin"
and "gitolite-admin.pub".

(cherry picked from commit 6b9ee30)
  • Loading branch information
bjornfor committed Sep 12, 2017
1 parent 898924e commit b98fda5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nixos/modules/services/misc/gitolite.nix
Expand Up @@ -4,7 +4,8 @@ with lib;

let
cfg = config.services.gitolite;
pubkeyFile = pkgs.writeText "gitolite-admin.pub" cfg.adminPubkey;
# Use writeTextDir to not leak Nix store hash into file name
pubkeyFile = (pkgs.writeTextDir "gitolite-admin.pub" cfg.adminPubkey) + "/gitolite-admin.pub";
hooks = lib.concatMapStrings (hook: "${hook} ") cfg.commonHooks;
in
{
Expand Down

0 comments on commit b98fda5

Please sign in to comment.