Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c717fe09aa2a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 476760bfeb4d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 25, 2019

  1. nixos/gitlab: Allow configuration of extra initializers

    This adds a configuration option allowing the addition of additional
    initializers in config/extra-gitlab.rb.
    bgamari committed Mar 25, 2019

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    f2bdc91 View commit details

Commits on Mar 26, 2019

  1. Merge pull request #57578 from bgamari/gitlab-extra-initializers

    nixos/gitlab: Allow configuration of extra initializers
    flokli authored Mar 26, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    476760b View commit details
Showing with 23 additions and 0 deletions.
  1. +23 −0 nixos/modules/services/misc/gitlab.nix
23 changes: 23 additions & 0 deletions nixos/modules/services/misc/gitlab.nix
Original file line number Diff line number Diff line change
@@ -160,6 +160,8 @@ let
'';
};

extraGitlabRb = pkgs.writeText "extra-gitlab.rb" cfg.extraGitlabRb;

smtpSettings = pkgs.writeText "gitlab-smtp-settings.rb" ''
if Rails.env.production?
Rails.application.config.action_mailer.delivery_method = :smtp
@@ -266,6 +268,26 @@ in {
description = "Extra configuration in config/database.yml.";
};

extraGitlabRb = mkOption {
type = types.str;
default = "";
example = ''
if Rails.env.production?
Rails.application.config.action_mailer.delivery_method = :sendmail
ActionMailer::Base.delivery_method = :sendmail
ActionMailer::Base.sendmail_settings = {
location: "/run/wrappers/bin/sendmail",
arguments: "-i -t"
}
end
'';
description = ''
Extra configuration to be placed in config/extra-gitlab.rb. This can
be used to add configuration not otherwise exposed through this module's
options.
'';
};

host = mkOption {
type = types.str;
default = config.networking.hostName;
@@ -586,6 +608,7 @@ in {
[ -L /run/gitlab/uploads ] || ln -sf ${cfg.statePath}/uploads /run/gitlab/uploads
cp ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
cp -rf ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
ln -sf ${extraGitlabRb} ${cfg.statePath}/config/initializers/extra-gitlab.rb
${optionalString cfg.smtp.enable ''
ln -sf ${smtpSettings} ${cfg.statePath}/config/initializers/smtp_settings.rb
''}