Commit graph

397 commits

Author SHA1 Message Date
Felix Singer d1f0807db5 nixos/jenkins: Bump Java version to 21
Java 17 goes EOL in September 2026 and Jenkins already supports Java 21.
So bump the Java version to 21.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-05-30 23:06:36 +02:00
Felix Singer 131d83ea6a nixos/jenkins: Introduce and make use of javaPackage option
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-05-30 22:37:11 +02:00
Felix Singer fbd42376f9 nixos/jenkins: Make use of mkEnableOption
Signed-off-by: Felix Singer <felixsinger@posteo.net>
2025-05-30 22:27:27 +02:00
Wolfgang Walther f934044282
nixos/hydra: avoid conflicts for local postgres ident map
The key change here is, that the match was on the hydra database only
previously, but is now limited to to the hydra role instead. This avoids
conflicts with rules that are created by other modules or downstream
users.

With this change, we can remove the additional "postgres postgres" line,
because the default pg_hba line will kick in again and allow the
postgres user access to the postgres role.

Renaming the map from hydra-users to hydra is for consistency, so that
all modules can define maps matching in name with the role they manage.

The change from ident to peer is just cosmetic, ident is only used for
TCP connections and falls back to peer anyway.
2025-05-10 10:32:47 +02:00
fleaz 8638793548 nixos/gitlab-runner: Add dockerPullPolicy option 2025-05-09 09:34:00 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Sandro Jäckel 588f41bef0
nixos/hydra: fix race condition in hydra-compress-logs
Source https://github.com/NixOS/hydra/pull/1450
2025-03-17 15:41:00 +01:00
shelvacu 1a4575f9db
nixos/modules: Add security.pki.caBundle option and make all services use it for CA bundles (#352244)
Previously some modules used `config.environment.etc."ssl/certs/ca-certificates.crt".source`, some used `"/etc/ssl/certs/ca-certificates.crt"`, and some used `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"`. These were all bad in one way or another:

- `config.environment.etc."ssl/certs/ca-certificates.crt".source` relies on `source` being set; if `text` is set instead this breaks, introducing a weird undocumented requirement
- `"/etc/ssl/certs/ca-certificates.crt"` is probably okay but very un-nix. It's a magic string, and the path doesn't change when the file changes (and so you can't trigger service reloads, for example, when the contents change in a new system activation)
- `"${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"` silently doesn't include the options from `security.pki`

Co-authored-by: Shelvacu <git@shelvacu.com>
2025-03-08 08:41:08 +00:00
Philip Taron 6630c758e0
nixos/hydra: fix hydra-compress-logs choking up on quoting when using zstd (#363980) 2024-12-31 12:22:57 -08:00
Sandro Jäckel eb46f107af
nixos/hydra: fix hydra-compress-logs choking up on quoting when using zstd 2024-12-26 23:58:11 +01:00
nicoo f6c5531461
nixos: Don't set !allowSubstitutes (#314664)
It is set by `runCommandLocal` and prevents fetching the build output
from `cache.nixos.org` or another trusted substituter.
2024-12-12 18:26:24 +00:00
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Felix Buehler 67553951b1 nixos/services.gocd-agent: remove with lib; 2024-12-08 13:21:50 +01:00
Felix Buehler d575253885 nixos/services.github-runners: remove with lib; 2024-12-08 13:21:50 +01:00
Felix Buehler 5ee4c4b0a1 nixos/services.buildbot-worker: remove with lib; 2024-12-08 13:21:50 +01:00
Alex Martens 69fd74d8fe nixos/github-runners: remove newam from maintainers 2024-12-07 08:52:49 -08:00
Dave Aitken 8c39875ae3
nixos/github-runner: use bashInteractive instead of bash (#339875)
Some github actions that use `bash` expect interactive features to be available. One such action is the [use-nix-shell](https://github.com/rrbutani/use-nix-shell-action) action. I couldn't find a way to override this even with `cfg.extraPackages`, due to the way the path is ordered.
2024-12-06 13:38:25 +08:00
misuzu e94bbdd993
nixos/gitlab-runner: let script options accept scripts as strings (#344644) 2024-12-03 23:25:31 +02:00
Ben Gamari 0a7dc31a85 gitlab-runner: Try fixing #356717 2024-12-01 15:03:37 -05:00
Jörg Thalheim 0f73a33f7e
nixos/buildbot-master: allow merging extraConfig and extraImports (#322469) 2024-11-04 13:32:04 +01:00
magic_rb 3b8c814fdc
buildbot: fix setting package to a drv from a different nixpkgs
Signed-off-by: magic_rb <richard@brezak.sk>
2024-11-02 17:01:20 +01:00
Sandro Jäckel 73824e231c nixos/hydra: fix shellcheck findings with enableStrictShellChecks enabled 2024-10-30 08:34:32 +00:00
Jörg Thalheim 9584ba7f85 nixos/buildbot: use python version used of the buildbot package
Since the buildbot package can be overwritten, it can be build against a
different python version.
This pull request makes sure we don't use the wrong python version.
This makes using buildbot-nix easier for both nixpkgs unstable and
nixpkgs stable.
2024-10-23 22:16:55 +11:00
Aaron Andersen 2ab323a087
nixos/github-runners: Make 'enable' functional (#342996) 2024-10-16 10:18:14 +02:00
James Atkins f579c189a7 nixos/buildbot-master: allow merging extraConfig and extraImports
Allow multiple definitions to be concatenated together with a new line.
2024-10-12 11:56:07 -05:00
Bjørn Forsman 48908e5b86 nixos: improve systemd slice names
Following
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Description=,
update slice names to be short, descriptive and capitalized.
2024-10-02 20:24:13 +02:00
danjujan aa6ef8e22b
nixos/gitlab-runner: let script options accept scripts as strings
The script options not only accept paths to a script but also the script as string. See https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-section
2024-09-26 14:41:46 +02:00
Daniel Nagy fdf019979e
nixos/jenkinsSlave: remove with lib; 2024-09-21 16:30:00 +02:00
zowoq 2ff3fa0e87 nixos/hydra: set a default for hydra-compress-logs service
follow up from 0c454e9317
2024-09-20 17:36:22 +10:00
Bryan Richter 588b1f8df6
nixos/github-runners: make enable functional
Fixes #305304
2024-09-20 09:09:17 +03:00
Weijia Wang 53eac0b4de nixos/buildbot: fix usage of escapeStr 2024-09-16 13:34:58 +02:00
Felix Buehler d43e1678e7 nixos/services.buildbot-master: remove with lib; 2024-09-15 10:43:48 +02:00
Rick van Schijndel f6b2548c60
nixos/hydra: unset SSL_CERT_FILE (#338536) 2024-09-09 20:29:36 +02:00
Rick van Schijndel 0eb77d8da5
nixos/hydra: add system-hydra.slice, fix typo (#338532) 2024-09-09 19:47:21 +02:00
Philip Taron 271d117596
treewide: fix eval related to with lib; removal (#339356) 2024-09-04 09:42:58 -07:00
éclairevoyant f6306c0961
treewide: fix eval related to with lib; removal 2024-09-04 12:21:09 -04:00
Sirio Balmelli dc700df6b2
nixos/github-runner: fix build failure
Shellcheck complains:

       > args=(
       >      ^-- SC2054 (warning): Use spaces, not commas, to separate array elements.

Add a comment disabling shellcheck in this case and annotating why.

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
2024-09-04 09:20:11 +02:00
Tomodachi94 2d8f095ab1
nixos/hydra: unset SSL_CERT_FILE
An ancient comment says to unset this variable after 16.03. Considering
we've just gotten past 24.05, I think it's safe to remove this finally.

Tests still pass after this change.
2024-08-30 21:26:59 -07:00
Tomodachi94 d464996f3f
nixos/hydra: fix typo 2024-08-30 21:11:17 -07:00
Tomodachi94 386a1d5d06
nixos/hydra: add system-hydra.slice
Part of #279915
2024-08-30 21:09:00 -07:00
Philip Taron 117f3ceb51
treewide/nixos: remove with lib; part 1 (#335603) 2024-08-29 15:42:04 -07:00
Felix Buehler 5fb90466e8 nixos/services.jenkins.jobBuilder: remove with lib; 2024-08-30 00:30:39 +02:00
Felix Buehler 4b3987ab25 nixos/services.jenkins: remove with lib; 2024-08-30 00:30:38 +02:00
Felix Buehler f80a40105a nixos/services.hydra: remove with lib; 2024-08-29 23:38:21 +02:00
Sandro Jäckel 0c454e9317 nixos/hydra: use configured compression in hydra-compress-logs service 2024-08-29 13:56:32 +10:00
Sandro Jäckel 55760e4c10 hydra: rename from hydra_unstable
There is no stable hydra package
2024-08-29 13:56:32 +10:00
Florian Klink bccb2f7c84 buildkite-agent: 3.76.2 -> 3.77.0
We can also drop the workaround included in the bump to 3.76.1, as
upstream reverted that behavorial change.
2024-08-08 13:24:15 +03:00
Sandro cfd25f7c6a
Merge pull request #322403 from dadada/dev/gitlab-runner-podman
nixos/gitlab-runner: allow access to podman socket
2024-08-03 16:48:09 +02:00
Florian Klink 129558261d
buildkite-agent: 3.59.0 -> 3.76.1 (#331340)
* buildkite-agent: 3.59.0 -> 3.76.1

* nixos/buildkite-agent: put each agent in its own private /tmp

Workaround for https://github.com/buildkite/agent/issues/2916, but
probably still a good idea.
2024-08-02 21:59:32 +02:00
Florian Sesser 828eb8c574 Gitlab-Runner: Add --post-get-sources-script
`--post-get-sources-script` has been added a while ago.  This
makes it available via the nix configuration.

See https://about.gitlab.com/blog/2023/03/27/changes-to-the-preclonescript/
2024-07-02 14:46:48 +00:00