1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-30 13:05:15 +03:00
Commit graph

11033 commits

Author SHA1 Message Date
Tert0
71ce1c3413
nixos/tests/{sway,swayfx}: fix pgrep commands to match wrapped swaylock 2025-01-31 14:03:32 +01:00
shivaraj-bh
4b9de23515 nixos/open-webui: quote services.open-webui.host in start script 2025-01-31 16:05:12 +05:30
Felix Buehler
e1b59f78a9 nixos/homer: add tests 2025-01-30 21:58:25 +01:00
aszlig
e35a65a2f8
nixos: Fix timesyncd test for systemd >= 257.1
Version 257.1 of systemd changed[1] the PrivateTmp setting for the
systemd-timesyncd service from "yes" to "disconnected", which broke our
systemd-timesyncd test.

The reason for this is because the systemd-tmpfiles-setup.service is
*only*[2] added as a dependency of systemd-timesyncd.service if
PrivateTmp is set to "yes" but not when it is set to "disconnected"
(which would make sense given that the tmpfiles.d mechanism was
originally designed for temporary files).

Commit 339a866b7c switched the activation
script to using systemd-tmpfiles, but the commit in question doesn't
provide an explanation why this was necessary in this particular case.

However the pull request[3] lists an ongoing effort to get rid of Perl
and in the future get also rid of BASH for activation. The reasons for
doing this are outlined in the document[4]:

> The simple presence of interpreters on a system pose a security risk.
> An attacker that gains access to a system can abuse them to execute
> arbitrary commands. Mitre lists this as technique T1059. The most
> radical yet simple solution to mitigate this exploit is to remove all
> interpreters from a system (Mitre M1042). This radical solution is
> only really feasible and/or interesting for appliances (i.e.
> non-interactive) systems. Especially for high-security solutions this
> mitigtation is interesting.

I personally don't think this is a very compelling reason, at least for
our activation scripts, since an attacker could simply drop an
executable binary. Nevertheless, getting rid of additional dependencies
on eg. Perl or BASH is something worth pursuing to trim down moving
parts.

To address this, I decided to implement this as a normal systemd service
unit, since we need to guarantee that it's started before
systemd-timesyncd.service and with a dedicated unit we can ensure
explicit ordering. This has the advantage that we don't interfere with
the effort of getting rid of Perl/BASH for activation/boot and also
don't risk running into race conditions (again) because it's very
unlikely that systemd will change/deprecate explicit unit ordering in
the near future.

[1]: 1f6e192848
[2]: 30675a6ee9/src/core/unit.c (L1274)
[3]: https://github.com/NixOS/nixpkgs/pull/263203
[4]: https://pad.lassul.us/nixos-perlless-activation

Signed-off-by: aszlig <aszlig@nix.build>
2025-01-30 19:28:51 +01:00
nixpkgs-ci[bot]
089bfe7c41
Merge staging-next into staging 2025-01-30 18:04:56 +00:00
Alyssa Ross
97fc6f36d0
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/by-name/ez/eza/package.nix
	pkgs/by-name/re/rewatch/package.nix
	pkgs/by-name/rq/rqbit/package.nix
	pkgs/development/python-modules/diffusers/default.nix
	pkgs/development/python-modules/manga-ocr/default.nix
	pkgs/development/tools/misc/texlab/default.nix
2025-01-30 15:02:26 +01:00
Ramses
823a05829f
nixos/activation: pass the action as an argument to the pre-switch-checks (#377526) 2025-01-30 11:25:33 +01:00
nixpkgs-ci[bot]
354d9c1c97
Merge staging-next into staging 2025-01-29 18:04:58 +00:00
Martin Weinelt
909803a20e
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/by-name/au/automatic-timezoned/package.nix
- pkgs/by-name/da/darklua/package.nix
- pkgs/by-name/ki/kittycad-kcl-lsp/package.nix
- pkgs/by-name/li/limbo/package.nix
- pkgs/by-name/mi/minijinja/package.nix
- pkgs/by-name/pa/pay-respects/package.nix
- pkgs/by-name/ri/river-bsp-layout/package.nix
- pkgs/by-name/sv/svgbob/package.nix
- pkgs/by-name/tu/tui-journal/package.nix
- pkgs/by-name/wa/waypipe/package.nix
- pkgs/development/python-modules/zxcvbn-rs-py/default.nix
2025-01-29 16:08:53 +01:00
Franz Pletz
a9ac4deac7
nixos/hound: restart service on changes (#377611) 2025-01-29 09:52:05 +01:00
7c6f434c
721168adda
squid: add nixos test (#377284) 2025-01-29 08:15:34 +00:00
Wolfgang Walther
4a5e71b144
postgresql: refactor postgresqlVersions attribute & tests (#377048) 2025-01-28 22:41:34 +01:00
Bjørn Forsman
5555b70e30 nixosTests.hound: migrate from 'config' to 'settings'
Fixes this eval warning:

  evaluation warning: The option `services.hound.config' defined in `makeTest parameters' has been changed to `services.hound.settings' that has a different type. Please read `services.hound.settings' documentation and update your configuration accordingly.
2025-01-28 19:47:17 +01:00
Alyssa Ross
35febc093c
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/by-name/ha/harper/package.nix
2025-01-28 13:29:32 +01:00
Krzysztof Nazarewski
49a26eda2a nixos/netbird: harden and extend options 2025-01-28 12:34:55 +01:00
r-vdp
e6bc540ce0
nixos/activation: pass the action as an argument to the pre-switch-checks
This allows for instance to reject switching into a configuration, while
still allowing to reboot into that same configuration.

This can be useful for instance to reject switching to a configuration
with a new systemd major version, but setting that same configuration as
the new boot default with `switch-to-configuration boot` is fine.
2025-01-28 11:40:38 +01:00
Martin Weinelt
33647a8179
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/by-name/ca/cargo-leptos/package.nix
- pkgs/by-name/ha/harper/package.nix
- pkgs/by-name/ma/marmite/package.nix
- pkgs/by-name/no/nomino/package.nix
- pkgs/by-name/st/stgit/package.nix
- pkgs/development/python-modules/pycm/default.nix
- pkgs/development/python-modules/python-gvm/default.nix
- pkgs/development/tools/rbspy/default.nix
2025-01-28 00:15:44 +01:00
Felix Bühler
bed0e7fadc
nixos/freshrss: add caddy support (#377068) 2025-01-27 21:39:01 +01:00
nixpkgs-ci[bot]
5df98c0ec5
Merge master into staging-next 2025-01-27 18:04:30 +00:00
Silvan Mosberger
7cceab521e
pds: init at 0.4.74, nixos/pds: init (#350645) 2025-01-27 13:54:09 +01:00
K900
b6f676fbd2 Merge remote-tracking branch 'origin/master' into staging-next 2025-01-27 15:42:36 +03:00
Bobby Rong
e28253539b
nixosTests.mate-wayland: Check for more text (#377283) 2025-01-27 19:43:21 +08:00
Bobby Rong
7db3b7c28b
nixosTests.mate-wayland: Check for more text
* As long as the dialog shows everything is fine, make the test less flaky.
* Also use `pgrep` instead of `pgrep -f` when possible.
2025-01-27 19:16:34 +08:00
Joshua Kobschätzki
433006b863 squid: add test 2025-01-27 12:12:01 +01:00
Morgan Jones
672f423d0c nixos/mattermost: default preferNixConfig to true
Now that we are disabling telemetry by default, we should attempt to
override it and other options in existing mutable configs,
if the user had a mutable config and advances their system.stateVersion.
2025-01-27 10:29:37 +01:00
Morgan Jones
fc3f7c17e2 nixos/mattermost: disable telemetry by default
We should disable telemetry but enable security update checks. Make both
controlable in the module without digging into settings.

Disabling telemetry also makes NixOS tests faster because the server
tries to send telemetry on first start.
2025-01-27 10:29:37 +01:00
Felix Buehler
88234d3a4f nixos/freshrss: add caddy support 2025-01-26 22:33:20 +01:00
Maximilian Bosch
eb96c8dc5b
postgresql: refactor postgresqlVersions attribute & tests
Every postgresql testcase essentially does the following things:

* Filter `postgresqlVersions` for server packages
* Filter postgresql server packages for suitable ones (i.e. extensions
  must support the given version)
* Generate an attribute-set of testcases

The first item became necessary in
7ab1e88833 given that
`postgresql/default.nix` now exposes JIT and non-JIT servers AND a
`libpq` that is not suitable for the tests here.

This changes restructures this a little bit, i.e.:

* Having an attribute-set that contains a bunch of postgresql servers
  and a single client package seems odd (and the sole consumer of
  `postgresqlVersions` in nixpkgs, the test suite, has to take that into
  account). Hence, postgresql's default.nix now provides `libpq` (the client)
  and a `postgresqlVersions` attribute with all supported JIT and non-JIT
  variants of postgresql.

* Each test-case gets a third argument, a function called `genTests`:
  this function sets `recurseForDerivations = true;` and generates an
  attribute-set of tests for each postgresql version given a function
  that returns a testcase or multiple test-cases (`makeTestFor`). The
  argument to `makeTestFor` is a postgresql server package.

  This function also accepts a filter predicate that is passed against
  `filterAttrs` to remove postgresql server packages that are not
  suitable for the test (e.g. because the version isn't supported by the
  extension to test).

I checked by making sure that the `.drv` doesn't change on staging with
this change on top for postgresq, postgresql-jit,
postgresql-wal-receiver, postgresql-tls-client-cert, anonymizer, pgjwt,
pgvecto-rs, timescaledb, tsja and wal2json.
2025-01-26 21:58:57 +01:00
Alyssa Ross
6723c183bf
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/by-name/ca/cargo-public-api/package.nix
	pkgs/by-name/ju/just/package.nix
	pkgs/by-name/kd/kdlfmt/package.nix
	pkgs/by-name/mo/mountpoint-s3/package.nix
	pkgs/by-name/wa/wayidle/package.nix
2025-01-26 19:49:51 +01:00
Arne Keller
2ab9225a40
stash: refactor; 0.25.1 -> 0.27.2; nixos/stash: init (#323231) 2025-01-26 15:16:35 +01:00
Julien Moutinho
f2a5463bf2 nixos/public-inbox: cleanup test 2025-01-26 15:06:05 +01:00
Julien Moutinho
bbb68bef2e nixos/public-inbox: test confinement 2025-01-26 15:06:05 +01:00
Alyssa Ross
502c77492b
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/applications/editors/vim/plugins/non-generated/avante-nvim/default.nix
	pkgs/applications/editors/vim/plugins/non-generated/cord-nvim/default.nix
	pkgs/applications/version-management/git-stack/default.nix
	pkgs/by-name/bo/boxbuddy/package.nix
	pkgs/by-name/ca/capnproto-rust/package.nix
	pkgs/by-name/ca/cargo-binstall/package.nix
	pkgs/by-name/ca/cargo-deb/package.nix
	pkgs/by-name/ca/cargo-modules/package.nix
	pkgs/by-name/cl/clapboard/package.nix
	pkgs/by-name/do/dotslash/package.nix
	pkgs/by-name/fe/felix-fm/package.nix
	pkgs/by-name/gi/gitlab-ci-ls/package.nix
	pkgs/by-name/go/gotify-desktop/package.nix
	pkgs/by-name/ha/handlr-regex/package.nix
	pkgs/by-name/ir/iroh/package.nix
	pkgs/by-name/ma/manga-tui/package.nix
	pkgs/by-name/ob/obs-cmd/package.nix
	pkgs/by-name/ox/oxlint/package.nix
	pkgs/by-name/pi/pik/package.nix
	pkgs/by-name/re/reindeer/package.nix
	pkgs/by-name/rn/rnr/package.nix
	pkgs/by-name/ro/routinator/package.nix
	pkgs/by-name/rw/rwpspread/package.nix
	pkgs/by-name/sk/skim/package.nix
	pkgs/by-name/so/sope/package.nix
	pkgs/by-name/so/soteria/package.nix
	pkgs/by-name/sp/spacer/package.nix
	pkgs/by-name/st/stylance-cli/package.nix
	pkgs/by-name/su/subxt/package.nix
	pkgs/by-name/sw/swayfx-unwrapped/package.nix
	pkgs/by-name/te/television/package.nix
	pkgs/by-name/to/toast/package.nix
	pkgs/by-name/wa/wastebin/package.nix
	pkgs/by-name/wi/wit-bindgen/package.nix
	pkgs/by-name/wo/workshop-runner/package.nix
	pkgs/development/interpreters/wasmtime/default.nix
	pkgs/development/tools/rust/cargo-edit/default.nix
	pkgs/development/tools/sentry-cli/default.nix
	pkgs/misc/t-rec/default.nix
	pkgs/tools/video/yaydl/default.nix
2025-01-26 14:55:08 +01:00
Adam C. Stephens
272fb5babf
nixos/tests/incus: extend check timeouts 2025-01-25 10:50:36 -05:00
Adam C. Stephens
0e7fa5714c
incus: fix instance unclean shutdown, add per-instance lxcfs support (#373920) 2025-01-25 10:05:03 -05:00
DrakeTDL
8814ab8ab5
nixos/stash: init 2025-01-24 10:50:55 -08:00
Pol Dellaiera
f426a49433
nixos/mongodb: add support for mongodb-ce package (#375587) 2025-01-24 19:24:49 +01:00
Austin Horstman
2a5f6cadd5
swayfx-unwrapped: backport fix to support updated libinput (#376189) 2025-01-24 12:00:44 -06:00
Alyssa Ross
53de5140ae
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/applications/editors/vim/plugins/non-generated/nvim-spectre/default.nix
	pkgs/applications/editors/vim/plugins/non-generated/sg-nvim/default.nix
	pkgs/by-name/ce/cedar/package.nix
	pkgs/by-name/gn/gnome-podcasts/package.nix
	pkgs/by-name/ru/rust-analyzer-unwrapped/package.nix
	pkgs/by-name/sy/systemctl-tui/package.nix
	pkgs/by-name/ti/tinty/package.nix
2025-01-24 16:40:22 +01:00
K900
5b961c87be nixos/tests/installer: add shellcheck-minimal
Required after #375961
2025-01-24 11:04:28 +03:00
Patrick Steinhardt
d267ea8717 nixos/wrappers: add per-wrapper enable option
While it is possible to globally enable or disable security wrappers, it
isn't possible to disable only a subset of them. Consequently, users
will have to overwrite the security wrappers completely and re-add the
desired subset in case they want to disable a subset of those set up by
the NixOS modules.

Address this usecase by adding a new per-wrapper enable option.
2025-01-23 19:56:06 +01:00
Grimmauld
80f8c4e269
nixos/tests/swayfx: fix deprecation warning 2025-01-23 19:29:10 +01:00
Cosima Neidahl
b7d58b870d
lomiri.lomiri-telephony-service: 0.5.3 -> 0.6.0, rename from lomiri.telephony-service (#374141) 2025-01-23 19:03:06 +01:00
t4ccer
6d0241ebb0
pds: add NixOS test 2025-01-23 10:26:13 -07:00
Robert Rose
95b894bad7 nixos/k3s: add autoDeployCharts option
The `autoDeployCharts` option further improves the auto deploying
capabilities of the k3s module by allowing to deploy and configure Helm charts
that are then instaled via the k3s Helm controller. Although this was
also previously possible by using auto deploying manifests, it required
some knowledge of the k3s Helm controller and led to a lot of
boilerplate code.
2025-01-23 16:34:35 +01:00
r-vdp
113dbd79de
nixos/activation: improve preSwitchChecks
A couple of improvements:

1. Avoid the generally discouraged apply argument to options, as it has
   quite weird semantics
2. Avoid issues when a user calls a preSwitchCheck `script`, which
   would've been silently overridden by the existing implementation.
   Reliance on a special attribute name like that is bound to lead to a
   very-hard-to-debug problem for someone at some point
3. Use writeShellApplication so that the preSwitchChecks are checked by
   shellcheck and and so that they run with basic bash guardrails
4. Fix shellcheck issue (testing the value of $?)
5. Add a positive preSwitchCheck to the nixos test, to make sure that
   that works as intended
2025-01-23 15:51:37 +01:00
nixpkgs-ci[bot]
dbd63f1910
Merge staging-next into staging 2025-01-23 06:05:26 +00:00
Lin Jian
363cce76a2
various: remove AndersonTorres from maintainership (#375416) 2025-01-23 13:37:50 +08:00
Anderson Torres
bc80114502 various: remove AndersonTorres from modules maintainership 2025-01-22 21:47:09 -03:00
nixpkgs-ci[bot]
a7ee3fbaaa
Merge staging-next into staging 2025-01-23 00:14:33 +00:00