Commit graph

188 commits

Author SHA1 Message Date
talyz 843082eb3a nixos/gitlab: Add findutils to runtime dependencies
Needed for the gitlab:cleanup:orphan_job_artifact_files rake task.
2022-10-09 08:12:19 +02:00
talyz bee6e1dafa nixos/gitlab: Deduplicate runtime dependency listing 2022-10-09 08:12:19 +02:00
talyz 0211edd1ff nixos/gitlab: Add workhorse.config option 2022-10-09 08:12:19 +02:00
Sandro 5e515466a9
Merge pull request #180149 from WilliButz/gitlab-module/fix-registry-issuer 2022-09-02 00:16:22 +02:00
pennae 722b99bc0e nixos/*: convert options with admonitions to MD
rendering changes only slightly, most changes are in spacing.
2022-08-31 16:36:16 +02:00
pennae 6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae d0ba463fcf nixos/*: replace <quote> with actual quotes 2022-08-19 22:40:58 +02:00
pennae 087472b1e5 nixos/*: automatically convert option docs 2022-08-06 20:39:12 +02:00
pennae 423545fe48 nixos/*: normalize manpage references to single-line form
now nix-doc-munge will not introduce whitespace changes when it replaces
manpage references with the MD equivalent.

no change to the manpage, changes to the HTML manual are whitespace only.
2022-08-05 18:34:50 +02:00
pennae 2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
M. A 61e3490c1c nixos/gitlab: Bump git to 2.35.4
Resolves CVE-2022-29187
2022-07-13 21:03:46 +00:00
WilliButz e2a322b3cd
nixos/gitlab: fix registry.issuer setting
Prior to this change, the configuration value for
`services.gitlab.registry.issuer` was only referenced by the
docker-registry configuration and in the `gitlab-registry-cert` service
while the gitlab config used the hard-coded value "gitlab-issuer".
2022-07-04 19:31:16 +02:00
WilliButz fbaae54932
Merge pull request #170947 from dpausp/gitlab-registry-cert-fix-path-condition
nixos/gitlab: fix gitlab-registry-cert path condition
2022-07-04 18:39:42 +02:00
Kim Lindberger 5710bac2b4
nixos/gitlab: Use Git 2.35.x to work around git bug (#177776)
Git 2.36.1 seemingly contains a commit-graph related bug which is
easily triggered through GitLab, so let's downgrade it to 2.35.x until
this issue is solved. See
https://gitlab.com/gitlab-org/gitlab/-/issues/360783#note_992870101.
2022-06-25 21:22:53 +02:00
Yureka 821724b184 nixos/gitlab: support 15.x 2022-05-22 13:09:36 +02:00
Tobias Stenzel 0c4f8e78b5 nixos/gitlab: fix gitlab-registry-cert path condition
`ConditionPathExists` belongs in the [Unit] section, not [Service].
The unit now properly checks if the cert file already
exists before activating so certs will not be overwritten anymore.
2022-04-29 23:57:57 +02:00
Alyssa Ross 8ba23e138d
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/development/libraries/zlib/default.nix
	pkgs/development/lua-modules/overrides.nix
2022-04-02 16:45:48 +00:00
Dominique Martinet e92c05349c nixos/logrotate: convert to freeform
using freeform is the new standard way of using modules and should replace
extraConfig.
In particular, this will allow us to place a condition on mails
2022-04-01 07:09:26 +09:00
Naïm Favier 9160044f5f
treewide/makeWrapper: replace --run cd with --chdir
Lay the groundwork for switching to binary wrappers by reducing uses
of `--run` (which is not supported by `makeBinaryWrapper`).
2022-03-19 09:46:31 +01:00
Yureka 51285d4c11
nixos/gitlab: fix redis deprecation warning 2022-02-10 12:19:48 +01:00
Kim Lindberger 415b9c3b5a
Merge pull request #157519 from talyz/gitlab-error-handling
nixos/gitlab: Implement better script error handling
2022-02-03 22:19:03 +01:00
talyz b65b9bf73c
nixos/gitlab: Implement better script error handling
Fail scripts on pipeline errors and propagate subshell errors.

If an error occurs in a subshell, including while trying to read a
secret file, we want that error to propagate to the main shell
context. That means we have to set the `inherit_errexit` option, which
allows errors from subshells to propagate to the outer shell. Also,
the subshell cannot run as part of another command, such as `export`,
since that will simply ignore the subshell exit status and only
respect `export`s exit status; first assigning the value to a variable
and then exporting it solves issue.
2022-01-31 13:09:20 +01:00
Lara 04560b9163 nixos/gitlab: Add additional paths to systemd.tmpfiles.rules
This fixes the NixOS gitlab test failure since gitlab 14.7.0.
2022-01-25 19:05:49 +01:00
Graham Christensen 06edb74413
Merge pull request #148785 from pennae/more-option-doc-staticizing
treewide: more defaultText for options
2021-12-17 11:14:08 -05:00
pennae ed673a69db treewide: add defaultText for options with simple cfg.* expression defaults
adds defaultText for options with defaults that use only literals, full config.*
paths, and the cfg shortcut binding.
2021-12-09 01:14:16 +01:00
pennae e24a8775a8 treewide: set defaultText for options using simple path defaults
adds defaultText for all options that set their default to a path expression
using the ubiquitous `cfg` shortcut bindings.
2021-12-09 01:12:13 +01:00
pennae 2512455639 nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
Naïm Favier 2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Lara fe034d33be nixos/gitlab: Enable roation of log files
This commit enables a logrotate service for gitlab using the default
values from omnibus. [1]

[1] https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb#L754

Resolves #136723
2021-09-15 09:57:18 +02:00
talyz 3dd17ae22f
gitlab: Enable puma's systemd notify support 2021-08-27 17:38:40 +02:00
talyz 99387372d5
gitlab: 14.1.2 -> 14.2.1 2021-08-26 19:01:22 +02:00
Yureka c5a0551dc4 nixos/gitlab: improve psql assertion message 2021-07-12 14:20:20 +02:00
Maciej Krüger ae54500506
Merge pull request #126253 from mkg20001/fc-gitlab 2021-07-06 20:58:12 +02:00
github-actions[bot] bae6b2055f
Merge master into staging-next 2021-06-25 12:06:04 +00:00
Yureka 2297eb35e5 nixos/gitlab: require at least postgresql 12 2021-06-25 01:21:19 +02:00
Maciej Krüger f4ddc02b0e
nixos/gitlab: add container registry 2021-06-09 23:19:25 +02:00
github-actions[bot] cf8441dd85
Merge staging-next into staging 2021-06-09 18:14:53 +00:00
talyz 8f16b16291
gitlab: Make sure the FOSS version isn't identified as EE 2021-06-09 17:50:45 +02:00
Maciej Krüger 7135ac0e00
nixos/gitlab: add extraEnv option
This allows users to define custom environment variables for gitlab, 
without having to modify the service file directly
2021-06-08 21:29:18 +02:00
Daniel Nagy cc5517da4c
nixos/gitlab: set port type to types.port 2021-05-30 14:38:20 +02:00
talyz 7842e89bfc
nixos/gitlab: Use replace-secret to avoid leaking secrets
Using `replace-literal` to insert secrets leaks the secrets through
the `replace-literal` process' `/proc/<pid>/cmdline`
file. `replace-secret` solves this by reading the secret straight from
the file instead, which also simplifies the code a bit.
2021-05-19 09:32:12 +02:00
Kim Lindberger fdd6ca8fce
Merge pull request #118898 from talyz/gitlab-memory-bloat
nixos/gitlab: Add options to tame GitLab's memory usage somewhat
2021-04-30 16:58:30 +02:00
talyz 7a67a2d1a8
gitlab: Add patch for db_key_base length bug, fix descriptions
The upstream recommended minimum length for db_key_base is 30 bytes,
which our option descriptions repeated. Recently, however, upstream
has, in many places, moved to using aes-256-gcm, which requires a key
of exactly 32 bytes. To allow for shorter keys, the upstream code pads
the key in some places. However, in many others, it just truncates the
key if it's too long, leaving it too short if it was to begin
with. This adds a patch that fixes this and updates the descriptions
to recommend a key of at least 32 characters.

See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/53602
2021-04-27 17:49:43 +02:00
talyz 6389170b39
nixos/gitlab: Set MALLOC_ARENA_MAX to "2"
This should reduce memory fragmentation drastically and is recommended
by both the Puma and the Sidekiq author. It's also the default value
for Ruby deployments on Heroku.
2021-04-10 10:49:31 +02:00
talyz 306fc0648b
nixos/gitlab: Add Sidekiq MemoryKiller support
Restart sidekiq automatically when it consumes too much memory. See
https://docs.gitlab.com/ee/administration/operations/sidekiq_memory_killer.html
for details.
2021-04-10 10:49:24 +02:00
talyz 6230936be2
nixos/gitlab: Add options to control puma worker and threads numbers 2021-04-10 10:49:18 +02:00
Milan Pässler e0d8f6b183
nixos/gitlab: do not set backup.upload by default 2021-04-07 09:21:18 +02:00
talyz 7b5cbde81f
nixos/gitlab: Gitlab -> GitLab 2021-03-30 19:13:43 +02:00
talyz 3fb04ca505
nixos/gitlab: Introduce automatic backup support
Add support for automatically backing up GitLab state, both locally
and to remote locations.
2021-03-30 19:13:31 +02:00
Milan 58804b24bc
nixos/gitlab: add option for tls wrapper-mode smtp (#116801) 2021-03-20 15:05:29 +01:00