anchor.diff:  let
     cfg = config.services.gitlab;
   
  -  ruby = pkgs.gitlab.ruby;
  +  ruby = cfg.packages.gitlab.ruby;
     bundler = pkgs.bundler;
   
  -  gemHome = "${pkgs.gitlab.env}/${ruby.gemPath}";
  +  gemHome = "${cfg.packages.gitlab.env}/${ruby.gemPath}";
   
     gitlabSocket = "${cfg.statePath}/tmp/sockets/gitlab.socket";
     pathUrlQuote = url: replaceStrings ["/"] ["%2F"] url;
  
positive.code:         chown -R ${cfg.user}:${cfg.group} ${gitlabEnv.HOME}/
          chmod -R u+rwX,go-rwx+X ${gitlabEnv.HOME}/
  
          cp -rf ${pkgs.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
          ln -sf ${cfg.statePath}/config /run/gitlab/config
          cp ${pkgs.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
  
          # JSON is a subset of YAML
          ln -fs ${pkgs.writeText "gitlab.yml" (builtins.toJSON gitlabConfig)} ${cfg.statePath}/config/gitlab.yml
  
negative.code:         User = cfg.user;
          Group = cfg.group;
          TimeoutSec = "300";
          WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
          ExecStart="${bundler}/bin/bundle exec \"sidekiq -q post_receive -q mailer -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P ${cfg.statePath}/tmp/sidekiq.pid\"";
        };
      };
  