SHARE
TWEET

gitlab.nix

a guest Oct 3rd, 2017 375 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {
  2.   network.description = "Gitlab";
  3.  
  4.   gitlab =
  5.     { config, pkgs, ... }:
  6.     {
  7.       deployment.targetEnv = "virtualbox";
  8.       deployment.virtualbox.memorySize = 2048;
  9.       deployment.virtualbox.headless = true;
  10.  
  11.       services.nginx = {
  12.         enable = true;
  13.         recommendedGzipSettings = true;
  14.         recommendedOptimisation = true;
  15.         recommendedProxySettings = true;
  16.         recommendedTlsSettings = true;
  17.         virtualHosts."git.example.com" = {
  18.           enableACME = true;
  19.           forceSSL = true;
  20.           locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
  21.         };
  22.       };
  23.  
  24.       services.gitlab = {
  25.         enable = true;
  26.         databasePassword = "eXaMpl3";
  27.         initialRootPassword = "UseNixOS!";
  28.         https = true;
  29.         host = "git.example.com";
  30.         port = 443;
  31.         user = "git";
  32.         group = "git";
  33.         smtp = {
  34.           enable = true;
  35.           address = "localhost";
  36.           port = 25;
  37.         };
  38.         secrets = {
  39.           db = "uPgq1gtwwHiatiuE0YHqbGa5lEIXH7fMsvuTNgdzJi8P0Dg12gibTzBQbq5LT7PNzcc3BP9P1snHVnduqtGF43PgrQtU7XL93ts6gqe9CBNhjtaqUwutQUDkygP5NrV6";
  40.           secret = "devzJ0Tz0POiDBlrpWmcsjjrLaltyiAdS8TtgT9YNBOoUcDsfppiY3IXZjMVtKgXrFImIennFGOpPN8IkP8ATXpRgDD5rxVnKuTTwYQaci2NtaV1XxOQGjdIE50VGsR3";
  41.           otp = "e1GATJVuS2sUh7jxiPzZPre4qtzGGaS22FR50Xs1TerRVdgI3CBVUi5XYtQ38W4xFeS4mDqi5cQjExE838iViSzCdcG19XSL6qNsfokQP9JugwiftmhmCadtsnHErBMI";
  42.         };
  43.         extraConfig = {
  44.           gitlab = {
  45.             email_from = "gitlab-no-reply@example.com";
  46.             email_display_name = "Example GitLab";
  47.             email_reply_to = "gitlab-no-reply@example.com";
  48.             default_projects_features = { builds = false; };
  49.           };
  50.         };
  51.       };
  52.     };
  53. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top