Commit Graph

6037 Commits

Author SHA1 Message Date
Luflosi
f2be3ae30d
nixos/kubo: restrict access to the API to users in a group by default 2023-04-15 15:25:20 +02:00
Luflosi
7ceebbb35b
nixos/kubo: allow multiple API and Gateway addresses
The daemon allows specifying an array of multiaddrs for Addresses.API and Addresses.Gateway, so the NixOS module should allow that as well.
2023-04-15 15:25:06 +02:00
Luflosi
929a00bd84
nixos/kubo: give normal users access to the daemon by default
Fixes https://github.com/NixOS/nixpkgs/issues/223289.

This doesn't reduce the security in any way since it was already possible for normal users to do what I do here and create such a fake repo for themselves and set their $IPFS_PATH variable to it. It was and still is also possible to just use the --api CLI option.
This change just removes the manual setup that would otherwise be required.

We wouldn't need this workaround if https://github.com/ipfs/kubo/pull/9366 was merged but the fix seems to have been ignored upstream. Patching it ourselves seems like a bad idea since the patch has security implications.
2023-04-15 15:24:58 +02:00
Luflosi
409df93c01
nixos/tests/kubo: use subtests instead of comments
Specify the intent of parts of the tests by using `with subtest("...")` instead of a comment for more clarity.
2023-04-15 15:24:49 +02:00
Luflosi
bf97703f0e
nixos/tests/kubo: clean up code
- Use `runTest` instead of `handleTest`, which simplifies the code a little
- Use `lib.maintainers` instead of `pkgs.lib.maintainers`
- Use `ipfs add --quieter` instead of `ipfs add | awk '{ print $2 }'`
- Whitespace and comment changes
2023-04-15 15:24:43 +02:00
Luflosi
62bff9ab15
nixos/tests/kubo: add Luflosi as maintainer 2023-04-15 15:24:37 +02:00
Alyssa Ross
3a776e1e30 nixosTests.cage: fix OCR properly
The underlying problem with OCR in this test has been that the only
font installed was DejaVu Sans, a proportional font, which xterm would
try to render as monospace.  This produced very broken looking text,
which the OCR understandably had trouble with.  With an actual
monospace font installed, there are no more problems and we don't need
the hacks.
2023-04-14 22:32:26 +00:00
Sandro
f9e70759cd
Merge pull request #213816 from karmanyaahm/karmanyaahm/nixos/kubo 2023-04-14 00:48:37 +02:00
Jonas Heinrich
86a685ceb1 nixos/maddy: Add option ensureCredentials 2023-04-13 09:36:54 -04:00
Karmanyaah Malhotra
5fb09c9e3a nixos/kubo: Test Kubo restart after a crash
Move strip() to definition

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-04-13 03:14:59 -05:00
Karmanyaah Malhotra
28949db47e nixos/kubo: reenable FUSE test with workaround
Update comment notice on broken fuse

Co-authored-by: Luflosi <Luflosi@users.noreply.github.com>
2023-04-13 03:14:59 -05:00
Sandro
603320b64f
Merge pull request #204534 from SuperSandro2000/boot-tmp 2023-04-12 21:37:47 +02:00
Ryan Lahfa
6a101d0be6
Merge pull request #225225 from puppe/fix-yggdrasil-tests
nixos/yggdrasil: fix yggdrasil local peering test
2023-04-12 13:36:37 +02:00
github-actions[bot]
47157337bf
Merge master into staging-next 2023-04-12 00:02:18 +00:00
Jörg Thalheim
89103b63d2
Merge pull request #225195 from Mic92/buildbot
buildbot: move out of python3.pkgs
2023-04-11 19:49:24 +01:00
github-actions[bot]
4e2c1815ed
Merge master into staging-next 2023-04-11 18:01:18 +00:00
Martin Weinelt
7e8b87566a
Merge pull request #219493 from covert8/ceph-17
ceph: 16.2.10 -> 17.2.5
2023-04-11 19:35:38 +02:00
marius david
83c344fedb nixos/tests/yggdrasil: fix local peering test 2023-04-11 14:34:28 +02:00
Jörg Thalheim
90b750456e buildbot: move out of python3.pkgs
By moving it out we can start apply overrides to python dependendencies
starting with sqlalchemy.

This fixes the build with the current version.
2023-04-11 12:38:58 +02:00
github-actions[bot]
fc0616b73d
Merge master into staging-next 2023-04-09 06:01:16 +00:00
Sandro
60a935583a
Merge pull request #211607 from Izorkin/fix-nginx-test 2023-04-09 02:59:58 +02:00
github-actions[bot]
75e19b98bb
Merge master into staging-next 2023-04-08 00:02:03 +00:00
Michele Guerini Rocco
26c3a8a421
Merge pull request #219580 from rnhmjoj/pr-libreswan
libreswan fixes
2023-04-07 20:32:56 +02:00
Vladimír Čunát
b856c0f8f4
Merge #218143: GNOME: 43 → 44
...into staging-next
2023-04-07 16:09:13 +02:00
Viv Lim
c778f4d225 nixos/mastodon: Allow configuring sidekiq processes
This change allows the number of sidekiq processes and which job classes
they handle to be configured.

An instance admin may choose to have separate sidekiq processes handling
jobs related to local users (`default` job class) and jobs related to
federation (`push`, `pull`, `ingress`), so that as the instance grows
and takes on more federation traffic, the local users' experience is not
as impacted.

For more details, see https://docs.joinmastodon.org/admin/scaling/#sidekiq

This pr also includes the following changes suggested in review:

- adds syslog identifiers for mastodon services
- moves working directory config to common cfgService
- adds mastodon.target
2023-04-06 16:30:16 +02:00
Jan Tojnar
d8dde72fbb nixosTests.gnome: Fix tests for 44
1. Launching an app externally (like we do in tests) does not dismiss the GNOME Shell’s Activities view opened on log-in.
2. Activities view grabs input so that user can type to search.
3. Due to a regression in Mutter 44, a window focus is not acquired when Shell grabs input
   3ac82a58c5

As a result, trying to determine the WMClass would throw:

    TypeError: global.display.focus_window is null

Let’s dismiss the Activities view with Escape key as a workaround.
2023-04-06 04:19:08 +02:00
Jan Tojnar
98d2e797e8 nixos/tests/gnome: Do not use autostart and switch to kgx
Starting terminal with autostart makes it harder to control when it is activated.
This reverts commit 7aaf526225.

Unfortunately, we cannot simply just go back since that would fail
as mentioned in the reverted commit.
It appears that this is due to the app not being able to find DISPLAY,
since switching to a different terminal emulator will complain:

    (kgx:1612): Gtk-WARNING **: 01:12:49.988: cannot open display: :0.0

Let’s use D-Bus activation rather than executing the program through su.
That will hopefully take care of all the necessary environment variables.

And since GNOME Terminal does not support D-Bus activation for the app,
let’s switch to GNOME Console. It probably makes sense anyway,
as it is the default terminal emulator.

Also let’s unify the WMClass detection a bit. Though, weirdly,
the WMClass differs on Wayland.
2023-04-06 04:19:08 +02:00
Sandro
aba8811574
Merge pull request #220216 from 06kellyjac/tracee
tracee: 0.11.0 -> 0.13.0
2023-04-05 14:22:50 +02:00
Ryan Lahfa
a6bc6ed645
Merge pull request #206983 from minijackson/netbox-3.4.1
netbox: 3.3.9 -> 3.4.7, netbox_3_3: init at 3.3.10, RFC42-style options, more tests
2023-04-05 14:04:27 +02:00
06kellyjac
27f407b4bb tracee: 0.11.0 -> 0.13.0
Also split out into separate outputs and dropped tracee-*
binaries due to the new single tracee binary

Mark aarch64-linux as officially supported
2023-04-05 10:47:26 +01:00
Martin Weinelt
ca051755d9
Merge pull request #224495 from Mic92/mediawiki-postgres
mediawiki: add support for postgresql
2023-04-04 12:21:06 +02:00
Minijackson
78eb4d64e7 netbox_3_3: init
reintroduce previous version, use in NixOS module if stateVersion < 23.05
2023-04-04 11:45:31 +02:00
Minijackson
949763988a nixos/tests/netbox: test through proxy, REST API, GraphQL, LDAP integration 2023-04-04 11:45:30 +02:00
ajs124
3acb3d73ae elasticsearch-oss: remove 2023-04-04 10:32:26 +02:00
ajs124
09a6672bbf elasticsearch6*: remove 2023-04-04 10:32:23 +02:00
Jörg Thalheim
d9c613d746 mediawiki: add support for postgresql 2023-04-04 07:50:04 +02:00
Bobby Rong
28031f7579
Merge pull request #216737 from FedericoSchonborn/budgie
Budgie Desktop
2023-04-03 10:57:32 +08:00
Federico Damián Schonborn
ce6f0af954
nixos/doc: add release note for Budgie Desktop
Signed-off-by: Federico Damián Schonborn <fdschonborn@gmail.com>
2023-04-02 21:52:39 -03:00
Federico Damián Schonborn
c0dcb5c24a
nixos/tests/budgie: init
Signed-off-by: Federico Damián Schonborn <fdschonborn@gmail.com>
2023-04-02 21:52:36 -03:00
Izorkin
c72007809d
nixos/tests/nginx: update nginx-http3 test 2023-04-01 16:25:44 +03:00
Izorkin
7ec7922b04
nixos/tests/nginx: update test script 2023-04-01 13:51:49 +03:00
Sandro
c2ae278eb8
Merge pull request #221851 from Ma27/postgresql-jit-support
postgresql: implement opt-in JIT support
2023-03-29 13:29:30 +02:00
Maximilian Bosch
e2fb651752
nixos/postgresql: fix enableJIT
Make sure that JIT is actually available when using

    services.postgresql = {
      enable = true;
      enableJIT = true;
      package = pkgs.postgresql_15;
    };

The current behavior is counter-intuitive because the docs state that
`enableJIT = true;` is sufficient even though it wasn't in that case
because the declared package doesn't have the LLVM dependency.

Fixed by using `package.withJIT` if `enableJIT = true;` and
`package.jitSupport` is `false`.

Also updated the postgresql-jit test to test for that case.
2023-03-29 08:39:47 +02:00
Maximilian Bosch
608cb37533
nixos/tests/postgresql: fix deprecation warning 2023-03-29 08:39:46 +02:00
Maximilian Bosch
2282fa73a1
postgresql: implement opt-in JIT support
Closes #150801

Note: I decided against resuming directly on #150801 because the
conflict was too big (and resolving it seemed too error-prone to me).
Also the `this`-refactoring could be done in an easier manner, i.e. by
exposing JIT attributes with the correct configuration. More on that
below.

This patch creates variants of the `postgresql*`-packages with JIT[1]
support. Please note that a lot of the work was derived from previous
patches filed by other contributors, namely dasJ, andir and abbradar,
hence the co-authored-by tags below.

Effectively, the following things have changed:

* For JIT variants an LLVM-backed stdenv with clang is now used as
  suggested by dasJ[2]. We need LLVM and CLang[3] anyways to build the
  JIT-part, so no need to mix this up with GCC's stdenv. Also, using the
  `dev`-output of LLVM and clang's stdenv for building (and adding llvm
  libs as build-inputs) seems more cross friendly to me (which will
  become useful when cross-building for JIT-variants will actually be
  supported).

* Plugins inherit the build flags from the Makefiles in
  `$out/lib/pgxs/src` (e.g. `-Werror=unguarded-availability-new`). Since
  some of the flags are clang-specific (and stem from the use of the
  CLang stdenv) and don't work on gcc, the stdenv of `pkgs.postgresql`
  is passed to the plugins. I.e., plugins for non-JIT variants are built
  with a gcc stdenv on Linux and plugins for JIT variants with a clang
  stdenv.

  Since `plv8` hard-codes `gcc` as `$CC` in its Makefile[4], I marked it
  as broken for JIT-variants of postgresql only.

* Added a test-matrix to confirm that JIT works fine on each
  `pkgs.postgresql_*_jit` (thanks Andi for the original test in
  #124804!).

* For each postgresql version, a new attribute
  `postgresql_<version>_jit` (and a corresponding
  `postgresqlPackages<version>JitPackages`) are now exposed for better
  discoverability and prebuilt artifacts in the binary cache.

* In #150801 the `this`-argument was replaced by an internal recursion.
  I decided against this approach because it'd blow up the diff even
  more which makes the readability way harder and also harder to revert
  this if necessary.

  Instead, it is made sure that `this` always points to the correct
  variant of `postgresql` and re-using that in an additional
  `.override {}`-expression is trivial because the JIT-variant is
  exposed in `all-packages.nix`.

* I think the changes are sufficiently big to actually add myself as
  maintainer here.

* Added `libxcrypt` to `buildInputs` for versions <v13. While
  building things with an LLVM stdenv, these versions complained that
  the extern `crypt()` symbol can't be found. Not sure what this is
  exactly about, but since we want to switch to libxcrypt for `crypt()`
  usage anyways[5] I decided to add it. For >=13 it's not relevant
  anymore anyways[6].

* JIT support doesn't work with cross-compilation. It is attempted to
  build LLVM-bytecode (`%.bc` is the corresponding `make(1)`-rule) for
  each sub-directory in `backend/` for the JIT apparently, but with a
  $(CLANG) that can produce binaries for the build, not the host-platform.

  I managed to get a cross-build with JIT support working with
  `depsBuildBuild = [ llvmPackages.clang ] ++ buildInputs`, but
  considering that the resulting LLVM IR isn't platform-independent this
  doesn't give you much. In fact, I tried to test the result in a VM-test,
  but as soon as JIT was used to optimize a query, postgres would
  coredump with `Illegal instruction`.

A common concern of the original approach - with llvm as build input -
was the massive increase of closure size. With the new approach of using
the LLVM stdenv directly and patching out references to the clang drv in
`$out` the effective closure size changes are:

    $ nix path-info -Sh $(nix-build -A postgresql_14)
    /nix/store/kssxxqycwa3c7kmwmykwxqvspxxa6r1w-postgresql-14.7	306.4M
    $ nix path-info -Sh $(nix-build -A postgresql_14_jit)
    /nix/store/xc7qmgqrn4h5yr4vmdwy56gs4bmja9ym-postgresql-14.7	689.2M

Most of the increase in closure-size stems from the `lib`-output of
LLVM

    $ nix path-info -Sh /nix/store/5r97sbs5j6mw7qnbg8nhnq1gad9973ap-llvm-11.1.0-lib
    /nix/store/5r97sbs5j6mw7qnbg8nhnq1gad9973ap-llvm-11.1.0-lib	349.8M

which is why this shouldn't be enabled by default.

While this is quite much because of LLVM, it's still a massive
improvement over the simple approach of adding llvm/clang as
build-inputs and building with `--with-llvm`:

    $ nix path-info -Sh $(nix-build -E '
	with import ./. {};
	postgresql.overrideAttrs ({ configureFlags ? [], buildInputs ? [], ... }: {
	  configureFlags = configureFlags ++ [ "--with-llvm" ];
	  buildInputs = buildInputs ++ [ llvm clang ];
	})' -j0)
    /nix/store/i3bd2r21c6c3428xb4gavjnplfqxn27p-postgresql-14.7	  1.6G

Co-authored-by: Andreas Rammhold <andreas@rammhold.de>
Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: Nikolay Amiantov <ab@fmap.me>

[1] https://www.postgresql.org/docs/current/jit-reason.html
[2] https://github.com/NixOS/nixpkgs/pull/124804#issuecomment-864616931
    & https://github.com/NixOS/nixpkgs/pull/150801#issuecomment-1467868321
[3] This fails with the following error otherwise:
    ```
    configure: error: clang not found, but required when compiling --with-llvm, specify with CLANG=
    ```
[4] https://github.com/plv8/plv8/blob/v3.1.5/Makefile#L14
[5] https://github.com/NixOS/nixpkgs/pull/181764
[6] c45643d618
2023-03-29 08:39:46 +02:00
Martin Weinelt
0a33e0d071
Merge pull request #223479 from dotlambda/vaultwarden-1.28.0
vaultwarden: 1.27.0 -> 1.28.0
2023-03-28 22:50:12 +02:00
Robert Schütz
f672b32b2e vaultwarden: 1.27.0 -> 1.28.0
Diff: https://github.com/dani-garcia/vaultwarden/compare/1.27.0..1.28.0

Changelog: https://github.com/dani-garcia/vaultwarden/releases/tag/1.28.0
2023-03-28 10:15:39 -07:00
Ryan Lahfa
482c735228
Merge pull request #223388 from 06kellyjac/authelia-move
authelia: move module under security and minor fixes
2023-03-27 21:59:57 +02:00
Ryan Lahfa
90b5f42ec9
Merge pull request #222946 from RaitoBezarius/zfs-6_2-6_3-compat
zfsUnstable: make it compatible again with 6.2.8 and potentially 6.3
2023-03-27 21:11:41 +02:00
K900
e74d28259d
Merge pull request #162479 from stuebinm/feature/mattermost-secrets
nixos/mattermost: add secretFile option for declarative configs (again)
2023-03-27 21:50:18 +03:00