1diff --git a/go/internal/config/config.go b/go/internal/config/config.go
2index f951fe6..b422fe3 100644
3--- a/go/internal/config/config.go
4+++ b/go/internal/config/config.go
5@@ -3,7 +3,6 @@ package config
6 import (
7 "io/ioutil"
8 "net/url"
9- "os"
10 "path"
11 "strings"
12
13@@ -30,16 +29,13 @@ type Config struct {
14 }
15
16 func New() (*Config, error) {
17- dir, err := os.Getwd()
18- if err != nil {
19- return nil, err
20- }
21+ dir := "/run/gitlab"
22
23 return NewFromDir(dir)
24 }
25
26 func NewFromDir(dir string) (*Config, error) {
27- return newFromFile(path.Join(dir, configFile))
28+ return newFromFile("/run/gitlab/shell-config.yml")
29 }
30
31 func (c *Config) FeatureEnabled(featureName string) bool {
32diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb
33index 0600a18..c46f2d7 100644
34--- a/lib/gitlab_keys.rb
35+++ b/lib/gitlab_keys.rb
36@@ -10,7 +10,7 @@ class GitlabKeys # rubocop:disable Metrics/ClassLength
37 attr_accessor :auth_file, :key
38
39 def self.command(whatever)
40- "#{ROOT_PATH}/bin/gitlab-shell #{whatever}"
41+ "/run/current-system/sw/bin/gitlab-shell #{whatever}"
42 end
43
44 def self.command_key(key_id)
45diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
46index 2cb76a8..f59ad5e 100644
47--- a/lib/gitlab_shell.rb
48+++ b/lib/gitlab_shell.rb
49@@ -190,7 +190,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
50
51 args = [executable, gitaly_address, json_args]
52 # We use 'chdir: ROOT_PATH' to let the next executable know where config.yml is.
53- Kernel.exec(env, *args, unsetenv_others: true, chdir: ROOT_PATH)
54+ # Except we don't, because we're already in the right directory on nixos!
55+ Kernel.exec(env, *args, unsetenv_others: true)
56 end
57
58 def api
59diff --git a/go/internal/command/fallback/fallback.go b/go/internal/command/fallback/fallback.go
60index 2cb76a8..f59ad5e 100644
61--- a/go/internal/command/fallback/fallback.go
62+++ b/go/internal/command/fallback/fallback.go
63@@ -21,7 +21,7 @@
64 )
65
66 func (c *Command) Execute() error {
67- rubyCmd := filepath.Join(c.RootDir, "bin", RubyProgram)
68+ rubyCmd := filepath.Join("/run/current-system/sw/bin", RubyProgram)
69
70 // Ensure rubyArgs[0] is the full path to gitlab-shell-ruby
71 rubyArgs := append([]string{rubyCmd}, c.Args[1:]...)