Commit Graph

374 Commits

Author SHA1 Message Date
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
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
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
Florian Sesser
42a2c268f6 preCloneScript is now preGetSourcesScript
The --pre-clone-script service configuration has been deprecated (https://docs.gitlab.com/ee/update/deprecations.html#deprecation-and-planned-removal-for-ci_pre_clone_script-variable-on-gitlab-saas) and replaced by --pre-get-sources-script (https://about.gitlab.com/blog/2023/03/27/changes-to-the-preclonescript/).
2024-07-02 13:23:30 +00:00
Janik H.
76cd1d2211 maintainers: drop janik
I guess my time has come as well...

With this commit, I'm not just dropping my maintainer entry, but I'm also
resigning from my duties as a board observer and NixCon project lead.
I also terminated my Summer of Nix contract today.
I'll also stop hosting the local NixOS meetup.

The only "project" I'll finish under the NixOS Foundation umbrella is
Google Summer of Code because the mentees aren't even remotely
responsible for why I'm leaving, and it would be unfair to leave them
hanging.

I'm grateful for all the things I was able to learn, for all the experiences
I could gather, and for all the friends I made along the way.
NixOS is what makes computers bearable for me, so I'll go and work on
some fork (*something something* you always meet twice in life).
2024-07-02 02:36:42 +02:00
Yaya
6f211d899d nixos/gitlab-runner: Add support runner authentication tokens
Support for *runner registration tokens* is deprecated since GitLab
16.0, has been disabled by default in GitLab 17.0 and will be removed in
GitLab 18.0, as outlined in the [GitLab documentation].

It is possible to [re-enable support for runner registration tokens]
until GitLab 18.0, to prevent the registration workflow from
breaking.

*Runner authentication tokens*, the replacement for registration tokens,
have been available since GitLab 16.0 and are expected to be defined in
the `CI_SERVER_TOKEN` environment variable, instead of the previous
`REGISTRATION_TOKEN` variable.

This commit adds a new option
`services.gitlab-runner.services.<name>.authenticationTokenConfigFile`.
Defining such option next to
`services.gitlab-runner.services.<name>.registrationConfigFile` brings
the following benefits:
- A warning message can be emitted to notify module users about the
  upcoming breaking change with GitLab 17.0, where *runner registration
  tokens* will be disabled by default, potentially disrupting
  operations.
- Some configuration options are no longer supported with *runner
  authentication tokens* since they will be defined when creating a new
  token in the GitLab UI instead. New warning messages can be emitted to
  notify users to remove the affected options from their configuration.
- Once support for *registration tokens* has been removed in GitLab 18,
  we can remove
  `services.gitlab-runner.services.<name>.registrationConfigFile` as
  well and make module users configure an *authentication token*
  instead.

This commit changes the option type of
`services.gitlab-runner.services.<name>.registrationConfigFile` to
`with lib.types; nullOr str` to allow configuring an authentication
token in
`services.gitlab-runner.services.<name>.authenticationTokenConfigFile`
instead.

A new assertion will make sure that
`services.gitlab-runner.services.<name>.registrationConfigFile` and
`services.gitlab-runner.services.<name>.authenticationTokenConfigFile`
are mutually exclusive. Setting both at the same time would not make
much sense in this case.

[GitLab documentation]: https://docs.gitlab.com/17.0/ee/ci/runners/new_creation_workflow.html#estimated-time-frame-for-planned-changes
[re-enable support for runner registration tokens]: https://docs.gitlab.com/17.0/ee/ci/runners/new_creation_workflow.html#prevent-your-runner-registration-workflow-from-breaking
2024-06-25 17:06:45 +02:00
Yaya
92a26526b9 nixos/gitlab-runner: Remove global with lib; 2024-06-25 17:06:45 +02:00
Tim Schubert
fc0fdbe85e nixos/gitlab-runner: allow access to podman socket
Allows access to podman control socket to gitlab-runner.
2024-06-25 14:45:04 +02:00
Artturin
ef00c78e0d
nixos/jenkins: add RuntimeDirectory
Necessary for jenkins socket which has to be enabled with

`JENKINS_UNIX_DOMAIN_PATH=/run/jenkins/jenkins.socket`

in `services.jenkins.environment`

https://www.github.com/jenkinsci/packaging/issues/455
2024-06-23 18:00:35 +03:00
Robin Appelman
c64e560c86 nixos/hydra: fix typo in hydra init script 2024-05-23 19:25:12 +02:00
Adam C. Stephens
95db6c67d7
Merge pull request #303149 from emilylange/forgejo-test-forgejo-actions
nixos/tests/forgejo: refactor and test Forgejo Actions workflow, nixos/gitea-actions-runner: set the `$HOME` environment variable
2024-04-17 08:27:13 -04:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
emilylange
2cd2419baf
nixos/gitea-actions-runner: set the $HOME environment variable
This fixes an issue where running the official `actions/checkout` action
from GitHub on a runner with label `:host`, would fail with incredibly
unhelpful error messages.

Turns out, this is due to `$HOME` not being set.
2024-04-10 22:09:55 +02:00
jxd
88d183af85 init 2024-03-27 12:27:19 +08:00
Sandro Jäckel
6cd7477733
nixos/hydra: add option for starman workers
This is useful for small deployments which do not need 5 spare starman
workers taking 160 MB of RAM each.
2024-02-27 15:45:20 +01:00
Artturi
dab023d0cc
Merge pull request #287257 from 999eagle/fix/hydra-pg-application-name
nixos/hydra: use set-default in hydra-env wrapper package
2024-02-18 17:21:53 +02:00
Sophie Tauchert
b670443f42
nixos/hydra: use set-default in hydra-env wrapper package 2024-02-12 11:16:32 +01:00
Vincent Haupert
6d8391a3ce nixos/github-runners: add a group option to set the executing group
Similar to the `user` option, the added `group` option sets the group of
the executing process. If not `null`, it also sets `DynamicUser=false`.
In case `user` is set to `null` (the default), systemd would run the
service as root implicitly. As this is dangerous and most certainly not
what users want, we force them to set `user = "root"` explicitly if
that's really their intention. That's achieved through an assertion.
2024-02-09 16:58:09 +01:00
Vincent Haupert
35df23c07d nixos/github-runners: set DynamicUser=false if user not null 2024-02-09 16:19:23 +01:00
Vincent Haupert
3f13f8d85e nixos/github-runners: align nodeRuntimes option with package
The `github-runner` package only supports `nodejs_20` since `nodejs_16`
was removed in a2976db919.

It still makes sense to keep the `nodeRuntimes` option as this is
probably not the last Node.js we'll deprecate with at least some grace
period.
2024-02-09 16:19:23 +01:00
Vincent Haupert
782b164523 nixos/github-runners: rework name default 2024-02-09 16:19:19 +01:00
Vincent Haupert
9ad02c831a nixos/github-runner: deprecate module in favor of github-runners.* 2024-02-09 15:14:32 +01:00
Vincent Haupert
ab57ba24cf nixos/github-runners: document new runner registrations
Make the documentation of the options `workDir` and `ephemeral` reflect
that changing these options will trigger a new runner registration.
2024-02-09 15:14:32 +01:00
Vincent Haupert
a9c807496f nixos/github-runners: add noDefaultLabels option
Add option `noDefaultLabels` which controls the `--no-default-labels`
switch passed to the configure script.
2024-02-09 15:14:32 +01:00
Vincent Haupert
ae140cd468 nixos/github-runners: remove superfluous usages of lib 2024-02-09 15:14:31 +01:00
Vincent Haupert
e6854b295b nixos/github-runners: only override pkg if it has a nodeRuntimes arg
Older versions of the github-runner package might not have the
`nodeRuntimes` argument yet causing an error as the NixOS module always
tries to override the argument.

The commit makes sure we only override `nodeRuntimes` if the configured
package has a `nodeRuntimes` argument.
2024-02-03 14:33:39 +01:00