summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMárton Boros <martonboros@gmail.com>2017-10-24 00:07:51 +0200
committerRobin Gloster <mail@glob.in>2017-10-30 12:49:27 +0100
commitc556c72a2efda33c6ef00ff376bd5596f6eca817 (patch)
treee66ad214fc805bf0d584e4fd1d9a1cd8a891c08a /nixos/modules
parent00c03e90038a4935da17fa0d5f5ca9d08fc19676 (diff)
downloadnixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar.gz
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar.bz2
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar.lz
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar.xz
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.tar.zst
nixlib-c556c72a2efda33c6ef00ff376bd5596f6eca817.zip
nixos/gitlab: fix secret generation
This line previously produced an error and an empty secret file.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/misc/gitlab.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index e0fae335d03b..7b2b40e59232 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -572,7 +572,7 @@ in {
         rm -rf ${cfg.statePath}/config ${cfg.statePath}/shell/hooks
         mkdir -p ${cfg.statePath}/config
 
-        tr -dc A-Za-z0-9 < /dev/urandom | head -c 32 > ${cfg.statePath}/config/gitlab_shell_secret
+        ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/config/gitlab_shell_secret
 
         # The uploads directory is hardcoded somewhere deep in rails. It is
         # symlinked in the gitlab package to /run/gitlab/uploads to make it