Commit Graph

7135 Commits

Author SHA1 Message Date
Ryan Lahfa
65481ecfef
Merge pull request #267985 from JulienMalka/absent-bootspec 2023-11-17 18:07:10 +01:00
Ryan Lahfa
ccfe07c316
Merge pull request #266270 from Ma27/postgresql-ownership-15 2023-11-17 18:02:17 +01:00
Raito Bezarius
10baca4935 nixos/invidious: do not use ensureDBOwnership
Invidious uses a strange setup where the database name is different from the system username
for non-explicit reasons.

Because of that, it makes it hard to migrate it to use `ensureDBOwnership`, we leave it to Invidious' maintainers
to pick up the pieces.
2023-11-17 15:53:08 +01:00
Raito Bezarius
73198870cd nixos/tests/pgbouncer: do not use ensureDBOwnership
pgbouncer test is special in the sense where it actually tries
to connect via SCRAM SHA, let's avoid `ensureDBOwnership` here
otherwise for some reason pgbouncer will try to look in pg_shadow
for the authuser…
2023-11-17 15:52:51 +01:00
Julien Malka
81e378618e
nixos/systemd-boot: allow for bootspec-less generations
Generation built with old versions of NixOS with no bootspec
support may still be present on the system and must be
accounted for.
2023-11-17 14:39:04 +01:00
paumr
f561320b8e nixos/tests/archi: init smoke tests for Archi 2023-11-17 01:09:08 +01:00
Weijia Wang
5d0ea948f7
Merge pull request #267490 from onny/wordpress-update5
wordpress6_4: init at 6.4.1; wordpressPackages: update
2023-11-16 22:24:07 +01:00
Matthias Beyer
da1923d134
Merge pull request #267931 from picnoir/pic/toot-0-38-2
toot: 0.38.1 -> 0.38.2
2023-11-16 21:20:06 +01:00
Pol Dellaiera
3acc2484cf
Merge pull request #267560 from anthonyroussel/bugfix/plantuml-server-nixos
nixos/plantuml-server: fix
2023-11-16 18:32:44 +01:00
Félix Baylac Jacqué
7e7d403939 nixosTests.pleroma: un-vendor toot
Upstream released 0.38.2. This new release contains the pleroma fix we
previously were getting from master.

We don't need this override anymore to get the test to succeed.

https://github.com/ihabunek/toot/issues/399#issuecomment-1814712723
2023-11-16 18:16:15 +01:00
rnhmjoj
7f71262745
nixos/tests/dnscrypt-wrapper: test TCP and run on port 443
- Test both TCP and UDP queries (tinydns → bind)
- Test IPv6 by default
- Run DNSCrypt on port 443 along with HTTPS
2023-11-15 21:42:40 +01:00
Anthony Roussel
2b455c1649
nixosTests.plantuml-server: init 2023-11-15 15:12:56 +01:00
Ryan Lahfa
d983d6c863
Merge pull request #251950 from erictapen/mastodon 2023-11-15 01:46:50 +01:00
ajs124
bf93b0bd3f nixos/test/ejabberd: remove myself as maintainer 2023-11-14 22:34:27 +01:00
Kerstin Humm
c82195d9e8
mastodon: 4.1.6 -> 4.2.1
- run streaming processes in separate systemd services
- remove redundancy in test
- fix update script
- release notes

See https://github.com/mastodon/mastodon/releases/tag/v4.2.1 for details
2023-11-14 21:13:46 +01:00
Kerstin Humm
0f535d40f9
nixos/mastodon: fix integration test 2023-11-14 21:13:45 +01:00
Jonas Heinrich
0d6a668d40 nixos/wordpress: Add test for wordpress6_4 2023-11-14 18:34:57 +01:00
Félix Baylac Jacqué
f80b2b510d nixosTests/pleroma: fix test
Two issues:

1. We need a subjectAltName on the TLS cert. Stolen from the akkoma
   test. <3 illdefined
2. There's a bug in the current toot release wrt. date parsing. It's
   been fixed upstream but it's not been released yet. Using the
   current toot master for this VM test to work around this.

Note: I warned upstream we'd need a new toot release.

Fixes https://github.com/NixOS/nixpkgs/issues/264951
2023-11-14 16:45:54 +01:00
Niklas Hambüchen
f9c7c12de6
Merge pull request #266702 from nh2/plausible-listen-address-no-distributed-erlang
plausible, nixos/plausible: Add `listenAddress` option
2023-11-14 10:52:21 +01:00
Niklas Hambüchen
65a471717c plausible, nixos/plausible: Add listenAddress option.
This changes

* the plausible HTTP web server

to be listening on localhost only, explicitly.

This makes Plausible have an explicit safe default configuration,
like all other networked services in NixOS.

For background discussion, see: https://github.com/NixOS/nixpkgs/issues/130244

As per my upstream Plausible contribution
(https://github.com/plausible/analytics/pull/1190)
Plausible >= 1.5 also defaults to listening to localhost only;
nevertheless, this default should be stated explicitly in nixpkgs
for easier review and independence from upstream changes, and
a NixOS user must be able to configure the
`listenAddress`, as there are valid use cases for that.

Also, disable

* the Erlang Beam VM inter-node RPC port
* the Erlang EPMD port

because Plausible does not use them (see added comment).
This is done by setting `RELEASE_DISTRIBUTION=none`.

Thus, this commit also removes the NixOS setting `releaseCookiePath`,
because it now has no effect.
2023-11-14 10:51:16 +01:00
Felix Bühler
f2fc5b4195
Merge pull request #265696 from Stunkymonkey/nixos-exportarr
nixos/exportarr: init
2023-11-13 22:58:32 +01:00
Maximilian Bosch
48459567ae nixos/postgresql: drop ensurePermissions, fix ensureUsers for postgresql15
Closes #216989

First of all, a bit of context: in PostgreSQL, newly created users don't
have the CREATE privilege on the public schema of a database even with
`ALL PRIVILEGES` granted via `ensurePermissions` which is how most of
the DB users are currently set up "declaratively"[1]. This means e.g. a
freshly deployed Nextcloud service will break early because Nextcloud
itself cannot CREATE any tables in the public schema anymore.

The other issue here is that `ensurePermissions` is a mere hack. It's
effectively a mixture of SQL code (e.g. `DATABASE foo` is relying on how
a value is substituted in a query. You'd have to parse a subset of SQL
to actually know which object are permissions granted to for a user).

After analyzing the existing modules I realized that in every case with
a single exception[2] the UNIX system user is equal to the db user is
equal to the db name and I don't see a compelling reason why people
would change that in 99% of the cases. In fact, some modules would even
break if you'd change that because the declarations of the system user &
the db user are mixed up[3].

So I decided to go with something new which restricts the ways to use
`ensure*` options rather than expanding those[4]. Effectively this means
that

* The DB user _must_ be equal to the DB name.
* Permissions are granted via `ensureDBOwnerhip` for an attribute-set in
  `ensureUsers`. That way, the user is actually the owner and can
  perform `CREATE`.
* For such a postgres user, a database must be declared in
  `ensureDatabases`.

For anything else, a custom state management should be implemented. This
can either be `initialScript`, doing it manual, outside of the module or
by implementing proper state management for postgresql[5], but the
current state of `ensure*` isn't even declarative, but a convergent tool
which is what Nix actually claims to _not_ do.

Regarding existing setups: there are effectively two options:

* Leave everything as-is (assuming that system user == db user == db
  name): then the DB user will automatically become the DB owner and
  everything else stays the same.

* Drop the `createDatabase = true;` declarations: nothing will change
  because a removal of `ensure*` statements is ignored, so it doesn't
  matter at all whether this option is kept after the first deploy (and
  later on you'd usually restore from backups anyways).

  The DB user isn't the owner of the DB then, but for an existing setup
  this is irrelevant because CREATE on the public schema isn't revoked
  from existing users (only not granted for new users).

[1] not really declarative though because removals of these statements
    are simply ignored for instance: https://github.com/NixOS/nixpkgs/issues/206467
[2] `services.invidious`: I removed the `ensure*` part temporarily
    because it IMHO falls into the category "manage the state on your
    own" (see the commit message). See also
    https://github.com/NixOS/nixpkgs/pull/265857
[3] e.g. roundcube had `"DATABASE ${cfg.database.username}" = "ALL PRIVILEGES";`
[4] As opposed to other changes that are considered a potential fix, but
    also add more things like collation for DBs or passwords that are
    _never_ touched again when changing those.
[5] As suggested in e.g. https://github.com/NixOS/nixpkgs/issues/206467
2023-11-13 17:16:25 +01:00
Nick Cao
025064944d
Merge pull request #267120 from teutat3s/zhf/fix-prometheus-exporter-smokeping
nixosTests.prometheus-exporters.smokeping fix test
2023-11-12 20:23:34 -05:00
teutat3s
5458e56907
nixosTests.prometheus-exporters.smokeping fix test 2023-11-13 00:46:27 +01:00
K900
2e5993d508 nixos/tests/udisks2: actually start udisks 2023-11-12 12:09:58 +03:00
tomberek
7859adb9d6
Merge pull request #245394 from christoph-heiss/pkgs/sourcehut
sourcehut: update all component; lots of fixes
2023-11-11 13:42:19 -05:00
Peder Bergebakken Sundt
0e8902941b
Merge pull request #266469 from ambroisie/fix-tandoor-recipes
tandoor-recipes: fix `django-allauth`
2023-11-11 20:42:10 +02:00
Bruno BELANYI
2fa56fcb30 nixos/tests/tandoor-recipes: use SQLite
This is a work-around for getting the tests working until #216989 is
fixed.
2023-11-11 18:37:33 +00:00
Christoph Heiss
589b75bdc8
sourcehut: disable IPv6 completely for tests
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 13:01:47 +01:00
Christoph Heiss
78cc2783c8
sourcehut: drop obsolete services array in favor of indivdual enable flags
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
2023-11-11 13:01:47 +01:00
Félix Baylac Jacqué
dfa45288af maintainers: ninjatrappeur -> picnoir
I changed my nickname from Ninjatrappeur to Picnoir. My github id is
stable, it shouldn't break too much stuff.

I took advantage of this handle change to remove myself from the
hostapd maintainers: I don't use NixOS as a router anymore.
2023-11-11 08:31:16 +01:00
Martin Weinelt
3536221702
Merge pull request #160346 from mweinelt/hass-custom-everything
home-assistant: custom components and lovelace modules
2023-11-11 00:08:25 +01:00
Martin Weinelt
c85cecedf1
nixos/tests/home-assistant: test custom things cleanup
Make sure we properly remove custom components and custom lovelace
modules, when they're not configured anymore.
2023-11-10 22:00:38 +01:00
Martin Weinelt
8108ce0a4f
nixos/tests/home-assistant: test loading custom components 2023-11-10 22:00:37 +01:00
Martin Weinelt
f2bd10bb1e
nixos/tests/home-assistant: test loading lovelace modules 2023-11-10 22:00:37 +01:00
Ryan Lahfa
b8218af2e6
Merge pull request #256226 from ElvishJerricco/systemd-stage-1-testing-backdoor 2023-11-10 14:08:07 +01:00
Lin Jian
36f4c90526
Merge pull request #266150 from robryk/resticnotimer
nixos/restic: allow timer to be disabled
2023-11-10 17:51:14 +08:00
Yureka
6d475b6d95 nixos/tests/sudo: check that sudo is enabled by default 2023-11-10 03:32:26 +01:00
Will Fancher
e9e2240763 nixos/tests/systemd-initrd-modprobe: Test parameter in stage 1 2023-11-09 17:53:49 -05:00
Will Fancher
b41cbee0fd nixos/tests/systemd-initrd-networkd-ssh: Test with backdoor not LUKS 2023-11-09 17:53:49 -05:00
Will Fancher
8900b027c7 nixos/tests/systemd-initrd-networkd: Use initrdBackdoor 2023-11-09 17:53:49 -05:00
Will Fancher
90e2658693 nixos/tests/systemd-initrd-networkd: Separate into different tests 2023-11-09 17:53:49 -05:00
Will Fancher
9a0f523372 systemd-stage-1: Enable backdoor in nixos tests 2023-11-09 17:53:48 -05:00
K900
63fe80d8d5
Merge pull request #266093 from K900/pipe-systemd-cat
treewide: replace `<command> | systemd-cat` with `systemd-cat <command>`
2023-11-08 11:28:44 +03:00
Artturi
c1cfba583d
Merge pull request #260050 from 6t8k/nixos-test-openssh-wait-for-sshd 2023-11-08 01:00:37 +02:00
Robert Obryk
20b202b3c8 nixos/restic: allow timer to be disabled 2023-11-07 22:37:37 +01:00
Felix Buehler
4d1680ccc7 nixos/exportarr: init 2023-11-07 20:56:32 +01:00
Weijia Wang
1dab6eb2ea nixosTests.shattered-pixel-dungeon: use wait_for_text 2023-11-07 19:33:16 +00:00
emilylange
03e7a22654 nixosTests.gitea: remove emilylange from maintainers
I no longer contribute to this test nor do I plan to do so in the
future.
My contributions moved to nixosTests.forgejo, after we (nixpkgs) decided
to split the gitea and forgejo nixpkgs modules.
2023-11-07 19:10:56 +01:00
K900
9843bbbeee treewide: replace <command> | systemd-cat with systemd-cat <command>
The former swallows exit codes, the latter doesn't.
2023-11-07 21:08:23 +03:00