Commit Graph

4499 Commits

Author SHA1 Message Date
Naïm Favier
8022c82a39 nixosTests.switchTest: fix race condition on /testpath
Currently the test-watch.service gets started in a loop as long as
/testpath exists, so `rm /testpath /testpath-modified` runs into a race
condition where if the service was just getting activated, it will
create /testpath-modified and make the test fail.

This is fixed by making the service RemainAfterExit so that it only
starts once, and stopping it manually after we remove /testpath.
2022-02-26 19:13:40 +09:00
Dominique Martinet
4d12b79cd7 logrotate: do not enable logrotate.service itself
logrotate.timer is enough for rotating logs. Enabling logrotate.service would
make the service start on every configuration switch, leading to tests failure when
logrotate is enabled.

Also update test to make sure the timer is active and runs the service
on date change.
2022-02-26 19:13:12 +09:00
Vladimír Čunát
bb75870cef
Merge #161734: nixos/tests/networking: Fix link test 2022-02-25 18:42:21 +01:00
Jörg Thalheim
9abf72f229
bird1: drop package + modules
reason: no longer maintained upstream.
2022-02-25 11:39:34 +01:00
zowoq
ec2028eb3c nixos/kubernetes: use kubectl from kubernetes
- also clarify kubectl wrapper naming
2022-02-25 19:22:30 +10:00
zowoq
4ee1f9eafc podman: 3.4.4 -> 4.0.1
https://github.com/containers/podman/releases/tag/v4.0.0
https://github.com/containers/podman/releases/tag/v4.0.1

- wrap helper binaries via CONTAINERS_HELPER_BINARY_DIR
2022-02-25 19:09:29 +10:00
Martin Weinelt
60225c6bbd
nixos/tests/networking: Fix link test
The test was looking at the wrong interface and relying on silly
behaviour by the dummy driver, which autocreated a `dummy0` interface on
modprobe.

Fix this by making it look at the actual `foo` interface that the test
creates.
2022-02-24 23:11:13 +01:00
Patrick Hilhorst
7ef8df8767
nixosTests.nano: replace with script using GNU expect 2022-02-24 21:26:25 +01:00
Connor Baker
e10eed89e7 hadoop: add back dots in names of nixos tests 2022-02-23 21:43:09 -05:00
Taeer Bar-Yam
74dcaf5784 zammad: test passes! 2022-02-23 10:41:28 -05:00
Taeer Bar-Yam
4d38b6460f zammad: reformat 2022-02-23 10:41:27 -05:00
Taeer Bar-Yam
75fe105a3d Zammad: more fixes 2022-02-23 10:41:27 -05:00
Taeer Bar-Yam
aac7f85483 zammad: fix module databases 2022-02-23 10:41:27 -05:00
Taeer Bar-Yam
e7aba931e2 zammad: fix module/test 2022-02-23 10:41:26 -05:00
Taeer Bar-Yam
e662b519a2 zammad: add module test 2022-02-23 10:41:25 -05:00
Martin Weinelt
d778e18366
Merge pull request #160042 from stigtsp/test/nginx-modsecurity 2022-02-23 12:02:20 +01:00
Janne Heß
e5823f77b3
Merge pull request #159187 from martinetd/logrotate
logrotate service enhancements
2022-02-23 11:24:17 +01:00
Stig Palmquist
21f5ce0bd9 nixos/tests/nginx-modsecurity: init 2022-02-23 08:54:52 +01:00
Martin Weinelt
b4ac004d09
nixos/test/networking: test bonding netdev creation
Previously the bonding driver would create an initial `bond0` interface
when it was loaded. If the network management integration used that
interface and did not recreate it, it was stuck to the default
`balance-rr` mode.

Deploying systemds modprobe.d configuration sets `max_bonds=0`, so we
don't run into that issue anymore.

Hence we now make sure that we can indeed create `bond0` with `802.3ad`
(LACP), which is a non default mode.
2022-02-22 17:29:41 +01:00
Guillaume Girol
4846d948b4
Merge pull request #156601 from symphorien/miniflux-password
nixos/miniflux: no cleartext password in the store
2022-02-21 21:18:36 +00:00
markuskowa
0fca9900b1
Merge pull request #157278 from ck3d/default-systemd-nspawn
nixos: Switch to default systemd-nspawn behaviour
2022-02-21 21:56:07 +01:00
Sandro
5a57844cf6
Merge pull request #158592 from SuperSandro2000/nginx-nixos 2022-02-20 16:32:09 +01:00
Renaud
4ccf58647a
Merge pull request #156224 from B4dM4n/nixos-tests-doh-proxy-rust
nixos/test/doh-proxy-rust: fix failing check
2022-02-19 16:31:14 +01:00
Christian Kögler
57fc08cfdb nixos: Switch to default systemd-nspawn behaviour 2022-02-19 09:52:37 +01:00
Izorkin
7629826b03
nixos/tests/prosody: return prosody-mysql test 2022-02-18 22:23:13 +03:00
Aaron Andersen
b3c0344c9d
Merge pull request #156763 from ratsclub/blocky
nixos/blocky: init
2022-02-18 11:27:25 -05:00
Janne Heß
dcbacb0f62
Merge pull request #160458 from helsinki-systems/fix/stc-backslashes
nixos/switch-to-configuration: Fix backslashes in unit names
2022-02-17 19:08:02 +01:00
Vladimír Čunát
fe78cacdff
Merge #159173: libbpf: 0.6.1 -> 0.7.0, bcc 0.23.0 -> 0.24.0 2022-02-17 13:36:46 +01:00
Janne Heß
3617ecb67f
nixos/switch-to-configuration: Fix backslashes in unit names
systemd needs this so special characters (like the ones in wireguard
units that appear because they are part of base64) can be escaped using
the \x syntax.

Root of the issue is that `glob()` handles the backslash internally
which is obviously not what we want here.

Also add a test case and fix some perlcritic issues in the subroutine.
2022-02-17 12:49:45 +01:00
Sandro
a6d259faf3
Merge pull request #141650 from 06kellyjac/agate 2022-02-16 00:56:27 +01:00
Martin Weinelt
32bd0aafab
nixos/tests/home-assistant: test package and components passing
There are now multiple combinations of how one can pass either
extraPackages or extraComponents. We now test those passed directly to
the package via an override, and those passed indirectly via the module,
that ultimately results in a second override to the package.
2022-02-15 23:41:52 +01:00
Martin Weinelt
191fb818e6
nixos/tests/home-assistant: test module-based package loading
Passing psycopg2 for PostgreSQL support in the recorder component is one
of the more popular use cases to pass an extra package.
2022-02-15 23:41:50 +01:00
Martin Weinelt
4b47eaee4d
nixos/tests/home-assistant: test module-based component loading 2022-02-15 23:41:49 +01:00
Martin Weinelt
05640ec19d
nixos/tests/home-assistant: add comments & reformat 2022-02-15 23:15:17 +01:00
Victor Freire
6532d3417e nixos/blocky: init 2022-02-14 22:48:32 -03:00
Martin Weinelt
4387ecec59
Merge pull request #159696 from r-ryantm/auto-update/prometheus-nextcloud-exporter 2022-02-14 23:22:55 +01:00
R. Ryantm
9d798e5103 prometheus-nextcloud-exporter: 0.4.0 -> 0.5.0 2022-02-14 21:49:16 +01:00
Connor Baker
737e30d3fe hadoop: add aarch64 support
This commit also changes the names of the tests for Hadoop so they use dashes instead of dots,
and makes the default `hadoop` test what would have been `hadoop-all` after the rename.

This change should mean that we're able to run

`nix build github:nixos/nixpkgs/master#nixosTests.hadoop`

which I was unable to do prior to this change.
2022-02-14 08:20:37 -05:00
Dominique Martinet
a05f1c9f93 nixos tests: add logrotate test
make sure the service is enabled by default and works.
2022-02-13 07:29:40 +09:00
Julien Moutinho
8f78d31ac1 nixos/sourcehut: test gitsrht 2022-02-12 02:11:34 +01:00
Janne Heß
fa3c756621
Merge pull request #157329 from helsinki-systems/feat/nixos-reload-triggers
nixos/systemd: Implement reload triggers
2022-02-11 23:59:26 +01:00
Dominique Martinet
824d26d395 bcc: 0.23.0 -> 0.24.0
Also add an extra test in nixos/tests/bpf.nix for BTF usage in bpftrace

Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
2022-02-11 20:37:39 +09:00
Sandro
6a4dea5ffc
Merge pull request #158178 from j0hax/retroarch-wm 2022-02-10 01:23:37 +01:00
Martin Weinelt
607285bc0e
Merge pull request #156873 from mweinelt/wine 2022-02-09 23:55:33 +01:00
Janne Heß
1c1f8c59e1
nixos/switch-test: Test the unit file parser and reloads 2022-02-09 15:14:38 +01:00
Johannes Arnold
d282f448ff nixos/retroarch: add RetroArch as a desktop session 2022-02-08 20:52:02 +01:00
Sandro Jäckel
ae66e2d5ec
treewide: use configured nginx package 2022-02-08 12:13:30 +01:00
06kellyjac
354b240782 nixos/agate: add nixos test 2022-02-07 16:03:58 +00:00
markuskowa
768dd74738
Merge pull request #140891 from markuskowa/os-moosefs
nixos: init moosefs module and test
2022-02-07 10:48:33 +01:00
Sandro
255417b8f4
Merge pull request #157146 from illustris/cloudinit 2022-02-07 01:27:21 +01:00
Robert Hensing
6be11a84aa
Merge pull request #155892 from hercules-ci/nixos-etc-unit-test
nixos: Refactor to allow `etc` unit test
2022-02-06 16:12:25 +01:00
Florian Klink
def482e28d
Merge pull request #150837 from abbradar/google-guest-agent
Move GCE config to google-guest-agent
2022-02-06 11:27:27 +01:00
Nikolay Amiantov
524aecf61e google-compute-config: update config 2022-02-05 23:33:10 +03:00
Michael Weiss
1c4d0f130b
Merge pull request #158027 from Synthetica9/test-sway-swaylock
nixosTests.sway: add swaylock test
2022-02-04 22:13:44 +01:00
Maximilian Bosch
6dfcf377a4
Merge pull request #157393 from LeSuisse/haproxy-2.5.1
haproxy: 2.3.14 -> 2.5.1
2022-02-04 20:31:08 +01:00
Maximilian Bosch
90a27b5771
Merge pull request #157247 from r-ryantm/auto-update/sudo
sudo: 1.9.8p2 -> 1.9.9
2022-02-04 16:05:30 +01:00
rnhmjoj
3b8fa47f58
nixos/wireless: don't attempt fallback on WPA3 only networks 2022-02-04 08:46:32 +01:00
Patrick Hilhorst
abcf236f36
nixosTests.sway: add swaylock test 2022-02-03 20:37:27 +01:00
Patrick Hilhorst
c39cc2e840
nixosTests.sway: factor out swaymsg 2022-02-03 20:37:21 +01:00
Patrick Hilhorst
aca22fb124
nixosTests.sway: format with nixpkgs-fmt 2022-02-03 20:25:05 +01:00
Markus Kowalewski
b74dc1a230
nixos/tests: add moosefs test 2022-02-03 12:31:36 +01:00
Euan Kemp
dc5859ef7a nixos/tests/k3s: remove stale test reference
https://github.com/NixOS/nixpkgs/pull/142706 renamed this test, but the
old 'k3s' one wasn't removed from all-tests.

Fix that.
2022-02-03 15:38:12 +10:00
Patryk Wychowaniec
62ce6f2c9d
unifi7: add package
https://community.ui.com/releases/UniFi-Network-Application-7-0-20/3e4a4099-c063-42f6-8e21-5fb2c99fcea9

Since that's a release candidate, unifiLTS remains unchanged.
2022-02-02 20:42:06 +01:00
Maciej Krüger
8bb7bec755
Merge pull request #141122 from Luflosi/add-apfs-nixos-module 2022-02-01 17:29:10 +01:00
Sandro
330c63f740
Merge pull request #156342 from midchildan/fix/noto-cjk-src 2022-02-01 16:01:37 +01:00
Maximilian Bosch
f5b67f3b27
nixos/sudo: fix test for 1.9.9
The test failed with

> Test "test5 user should not be able to run commands under root" failed with
> error: "invalid literal for int() with base 10: ''"

since 2492da88ea.

The reason for this is that `sudo(8)` writes the lecture to the
tty[1] and only as a fallback to stdout[2]. This means that the
`base64 --wrap 0` executed by `machine.execute()` doesn't affect the
text written to the terminal, however the lecture is part of the string
that's read from the VM via `shell.recv()`.

I confirmed the problem in an interactive test session[3]:

    >>> command = "sudo -u test5 sudo -n -u root true"
    >>> out_command = f"( set -euo pipefail; {command} ) | (base64 --wrap 0; echo)\n"
    >>> machine.shell.send(out_command.encode())
    84

    >>> machine # [   99.015512] sudo[877]:     root : TTY=hvc0 ; PWD=/tmp ; USER=test5 ; COMMAND=/run/wrappers/bin/sudo -n -u root true
    machine # [   99.019373] sudo[877]: pam_unix(sudo:session): session opened for user test5(uid=1005) by (uid=0)
    machine # [   99.038692] sudo[879]: pam_unix(sudo:auth): conversation failed
    machine # sudo: a password is required
    machine # [   99.041860] sudo[879]: pam_unix(sudo:auth): auth could not identify password for [test5]
    machine # [   99.046901] sudo[877]: pam_unix(sudo:session): session closed for user test5
    >>>
    >>> x=machine._next_newline_closed_block_from_shell()
    >>> print(x)
    <newline>
    We trust you have received the usual lecture from the local System
    Administrator. It usually boils down to these three things:
    <newline>
        #1) Respect the privacy of others.
        #2) Think before you type.
        #3) With great power comes great responsibility.
    <newline>
    <newline>
    <newline>
    >>>

Since the lecture isn't strictly necessary to confirm that
`security.sudo` works as expected, I decided to disable lecturing
inside the test, however we may want to fix the underlying problem in
the test-driver at some point.

[1] https://github.com/sudo-project/sudo/blob/SUDO_1_9_9/plugins/sudoers/check.c#L275-L283
[2] https://github.com/sudo-project/sudo/blob/SUDO_1_9_9/src/conversation.c#L95-L120
[3] I replaced each empty line with `<newline>` to make sure these
    aren't swallowed by git.
2022-02-01 12:55:29 +01:00
Guillaume Girol
1df9e95ed7 nixos/miniflux: no cleartext password in the store 2022-01-31 21:31:28 +01:00
Michele Guerini Rocco
09e2956012
Merge pull request #155895 from rnhmjoj/pr-dhcpd-hard
nixos/dhcpd: switch to DynamicUser [v2]
2022-01-31 10:06:57 +01:00
illustris
43cfb7204b nixos/cloud-init: add support for network configuration 2022-01-31 09:50:23 +05:30
midchildan
233931b7a3
nixos/tests/noto-fonts: add midchildan as maintainer 2022-01-31 02:51:01 +09:00
Thomas Gerbet
023a62d2de haproxy: 2.3.14 -> 2.5.1
Closes #153262
2022-01-30 13:37:20 +01:00
Robert Hensing
9809e1575b nixos/etc.nix: Make independent
(cherry picked from commit 56c283e5c8dfd4d8d5daa15dfa3896beef2ac012)
2022-01-30 09:01:27 +01:00
Sandro
30396b78db
Merge pull request #157261 from LeSuisse/mysql57-5.7.37 2022-01-30 01:04:23 +01:00
Niklas Hambüchen
13f5c4c45b
Merge pull request #156731 from Ma27/bump-plausible
plausible: 1.4.0 -> 1.4.3
2022-01-29 22:32:15 +01:00
Thomas Gerbet
55561105fa mysql57: 5.7.27 -> 5.7.37
Changes:
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-37.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-36.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-35.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-34.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-33.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-32.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-31.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-30.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-29.html
https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-28.html
2022-01-29 11:04:47 +01:00
pennae
6b8e88268e
Merge pull request #156213 from chkno/fix-install-tests
nixos/tests/install: Fix after sandboxed-docs change fc614c3
2022-01-29 00:15:53 +00:00
Martin Weinelt
9cc3612ac1
Merge pull request #156855 from B4dM4n/breitbandmessung-init 2022-01-28 20:10:48 +01:00
Sandro
46903948d2
Merge pull request #147189 from pasqui23/xxh 2022-01-28 11:40:03 +01:00
Wout Mertens
ecd6b2864c
Merge pull request #147557 from wmertens/nixos-ozone
wayland: enable ozone via $NIXOS_OZONE_WL
2022-01-27 23:46:27 +01:00
Thomas Gerbet
725d843cc8 flatpak: 1.12.2 -> 1.12.4
Fixes CVE-2021-43860 and CVE-2022-21682

Changes:
https://github.com/flatpak/flatpak/releases/tag/1.12.4
https://github.com/flatpak/flatpak/releases/tag/1.12.3

Security advisories:
https://github.com/flatpak/flatpak/security/advisories/GHSA-qpjc-vq3c-572j
https://github.com/flatpak/flatpak/security/advisories/GHSA-8ch7-5j3h-g4fx
2022-01-27 13:57:07 -08:00
Bernardo Meurer
5f9b470ff0
Merge pull request #154809 from helsinki-systems/feat/stc-proper-unit-file-parser
nixos/switch-to-configuration: Proper unit file parser and clean/fix lower part of the script
2022-01-27 09:35:34 -08:00
Luflosi
26a695399a
nixos/apfs: init
Add the final missing pieces for full APFS support.
2022-01-27 15:18:45 +01:00
Fabian Möller
9ec1d80c55
nixos/tests/breitbandmessung: use virtualisation.resolution option 2022-01-27 14:39:02 +01:00
Fabian Möller
487aa0781d
breitbandmessung: init at 3.1.0 2022-01-27 13:45:51 +01:00
Wout Mertens
b2eb5f62a7 wayland: enable ozone via $NIXOS_OZONE_WL
Chrome, Chromium, VSCode, Slack, Signal, Discord, element-desktop,
schildichat.

For the latter two, the feature flag useWayland was removed and a
wrapper script was provided.
2022-01-27 09:46:36 +01:00
polykernel
4a9d9928dc nixos/nix-daemon: use structural settings
The `nix.*` options, apart from options for setting up the
daemon itself, currently provide a lot of setting mappings
for the Nix daemon configuration. The scope of the mapping yields
convience, but the line where an option is considered essential
is blurry. For instance, the `extra-sandbox-paths` mapping is
provided without its primary consumer, and the corresponding
`sandbox-paths` option is also not mapped.

The current system increases the maintenance burden as maintainers have to
closely follow upstream changes. In this case, there are two state versions
of Nix which have to be maintained collectively, with different options
avaliable.

This commit aims to following the standard outlined in RFC 42[1] to
implement a structural setting pattern. The Nix configuration is encoded
at its core as key-value pairs which maps nicely to attribute sets, making
it feasible to express in the Nix language itself. Some existing options are
kept such as `buildMachines` and `registry` which present a simplified interface
to managing the respective settings. The interface is exposed as `nix.settings`.

Legacy configurations are mapped to their corresponding options under `nix.settings`
for backwards compatibility.

Various options settings in other nixos modules and relevant tests have been
updated to use structural setting for consistency.

The generation and validation of the configration file has been modified to
use `writeTextFile` instead of `runCommand` for clarity. Note that validation
is now mandatory as strict checking of options has been pushed down to the
derivation level due to freeformType consuming unmatched options. Furthermore,
validation can not occur when cross-compiling due to current limitations.

A new option `publicHostKey` was added to the `buildMachines`
submodule corresponding to the base64 encoded public host key settings
exposed in the builder syntax. The build machine generation was subsequently
rewritten to use `concatStringsSep` for better performance by grouping
concatenations.

[1] - https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md
2022-01-26 21:04:50 -05:00
Martin Weinelt
ab34ab74ee
nixos/tests/tinywl: enable polkit
Tinywl just segfaults when polkit is missing, probably because it can't
access required resources.
2022-01-27 01:45:46 +01:00
Martin Weinelt
bcbeaa003b
Merge pull request #156205 from B4dM4n/nixos-tests-teeworlds 2022-01-26 21:13:37 +01:00
Martin Weinelt
e779f3dee4
nixos/tests/wine: fix disksize type 2022-01-26 17:14:51 +01:00
Pascal Bach
5374a4a005
Merge pull request #156220 from B4dM4n/nixos-tests-geth
nixos/tests/geth: fix api check
2022-01-26 13:31:17 +01:00
Martin Weinelt
89e18a19cd
Merge pull request #156738 from mweinelt/hass-ping 2022-01-26 00:08:47 +01:00
Nick Cao
f8832996d8
nixos: add sample test for noto fonts 2022-01-26 03:02:45 +09:00
Martin Weinelt
d9ad2b40f1
nixos/tests/home-assistant: test ping via wake_on_lan component
Let the home-assistant instance linger around for 30s so it can run
regular jobs and trigger more code paths that could result in errors.
2022-01-25 18:30:45 +01:00
Maximilian Bosch
e211c94b94
plausible: 1.4.0 -> 1.4.3
ChangeLog: https://github.com/plausible/analytics/blob/v1.4.3/CHANGELOG.md#unreleased

Also makes the option `services.plausible.releaseCookiePath` mandatory[1]: since Elixir
1.13 the `RELEASE_COOKIE` env-var *must* be set, otherwise the startup
fails[2]. Since we drop `$out/releases/COOKIE` in the `fixupPhase` of
`mixRelease` and Elixir seems to always attempt to generate such a
file[3], I figured it's reasonable to just make it mandatory now.

Closes #155575

[1] https://nixos.org/manual/nixos/stable/options.html#opt-services.plausible.releaseCookiePath
[2] f24eb2c1ef /
    https://github.com/elixir-lang/elixir/issues/11114
[3] https://hexdocs.pm/mix/Mix.Tasks.Release.html, see `:cookie`
2022-01-25 17:19:49 +01:00
Fabian Möller
520383dd0b
nixos/tests/bird: init 2022-01-25 15:15:52 +01:00
Anderson Torres
48743a4f17
Merge pull request #156571 from AndersonTorres/new-misc
mpc: install Bash shell completion (and more)
2022-01-25 10:20:29 -03:00
Jacek Galowicz
ac44b27bab
Merge pull request #153077 from Madouura/dev/bcachefs-test
nixos/tests/bcachefs: use multi-disk
2022-01-25 11:53:44 +01:00
AndersonTorres
a2658f4633 nixos/tests/mpd.nix: mpc_cli -> mpc-cli 2022-01-24 23:24:06 -03:00
Bernardo Meurer
16f77e1412
Merge pull request #153932 from jmc-figueira/wine-wayland
wine-wayland: added derivation for building the experimental Wayland driver for Wine
2022-01-24 20:52:24 +00:00
Guillaume Girol
1b1fe46bb1
Merge pull request #156314 from B4dM4n/nixos-tests-missing
nixos/tests: add missing tests
2022-01-24 19:32:15 +00:00