Commit Graph

31639 Commits

Author SHA1 Message Date
Alvar Penning
b0f7820251 nixos/ympd: Unit hardening
Next to some systemd unit hardening, the nobody user isn't used anymore,
as suggested in #55370.
2023-02-13 14:56:05 +01:00
Tom McLaughlin
24a7da1425 Introduce mkBinaryCache function 2023-02-13 14:56:01 +01:00
16e6ce7824 pgadmin4: add option to enable desktop mode
By default, pgadmin4 uses SERVER_MODE = True. This requires
access to system directories (e.g. /var/lib/pgadmin). There is
no easy way to change this mode during runtime. One has to change
or add config files withing pgadmin's directory structure to change it
or add a system-wide config file under `/etc/pgadmin`[1].

This isn't always easy to achive or may not be possible at all. For
those usecases this implements a switch in the pgadmin4 derivation and
adds a new top-level package `pgadmin4-desktopmode`. This builds in
DESKTOP MODE and allows the usage of pgadmin4 without the nixOS module
and without access to system-wide directories.

pgadmin4 module saves the configuration to /etc/pgadmin/config_system.py
pgadmin4-desktopmode tries to read that as well. This normally fails with
a PermissionError, as the config file is owned by the user of the pgadmin module.

With the check-system-config-dir.patch this will just throw a warning
but will continue and not read the file.

If we run pgadmin4-desktopmode as root
(something one really shouldn't do), it can read the config file and fail,
because of the wrong config for desktopmode.

[1]https://www.pgadmin.org/docs/pgadmin4/latest/config_py.html

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2023-02-13 14:55:54 +01:00
2437d343a9 nixosTests.pgadmin4-standalone: format
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2023-02-13 14:55:54 +01:00
0427afdc74 pgadmin4: move package tests back into the package
We test pgadmin in nixosTests, because it needs a running postgresql instance.
This is now unnecessary since we can do so in the package itself.

This reduces the complexity of pgadmin and removes the need for the extra
nixosTests.

Also setting SERVER_MODE in `pkg/pip/setup_pip.py` does not have any effect
on the final package, so we remove it.
In NixOS, we use the module, which expects SERVER_MODE to be true (which it defaults to).
In non-NixOS installations, we will need the directory /var/lib/pgadmin and /var/log/pgadmin

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2023-02-13 14:55:54 +01:00
Izorkin
f849e64c0a nixos/systemd-coredump: fix group id 2023-02-13 14:55:52 +01:00
IndeedNotJames
e7aa70d2ea nixos/caddy: fix caddy fmt for caddy v2.6.3
The nixos module uses `caddy fmt` to *format* the generated Caddyfile.
v2.6.3 slightly altered `caddy fmt`'s behavior.

Excerpt from https://github.com/caddyserver/caddy/releases/tag/v2.6.3
> cmd: caddy fmt return code is 1 if not formatted
> cmd: fmt exit successfully after overwriting config file

Which is why the internal `Caddyfile-formatted` now uses `cp` and `caddy fmt --overwrite` instead
2023-02-13 14:55:51 +01:00
Yueh-Shun Li
29f92eb0e9 apptainer, singularity: enable non-FHS --fakeroot support
This patch provides input arguments `newuidmapPath` and `newgidmapPath`
for apptainer and singularity to specify the path to the SUID-ed executables
newuidmap and newgidmap where they are not available from the FHS PATH.

As NixOS places those suided executables in a non-FHS position
(/run/wrapper/bin), this patch provides
programs.singularity.enableFakeroot option and implement with the above
input parameters.
2023-02-13 14:55:43 +01:00
Yueh-Shun Li
3477455404 apptainer, singularity: fix defaultPath and reflect upstream changes
Upstream changes:
singularity 3.8.7 (the legacy) -> apptainer 1.1.3 (the renamed) / singularity 3.10.4 (Sylabs's fork)

Build process:
*   Share between different sources
*   Fix the sed regexp to make defaultPath patch work
*   allowGoReference is now true
*   Provied input parameter removeCompat (default to false)
    that removes the compatible "*singularity*" symbolic links
    and related autocompletion files when projectName != "singularity"
*   Change localstatedir to /var/lib
*   Format with nixpkgs-fmt
*   Fix the defaultPath patching
    and use it instead of the `<executable> path` config directive
    deprecated in Apptainer
*   Provide dependencies for new functionalities such as
    squashfuse (unprivileged squashfs mount)
*   Provide an attribute `defaultPathInputs` to override
    prefix of container runtime default PATH

NixOS module programs.singularity:
*   Allow users to specify packages
*   Place related directories to /var/lib
*   Format with nixpkgs-fmt

singularity-tools:
*   Allow users to specify packages
*   Place related directories to /var/lib when building images in VM
2023-02-13 14:55:43 +01:00
Yueh-Shun Li
a2103f41c5 nixos/modules/programs/singularity.nix: format expression 2023-02-13 14:55:42 +01:00
Sandro Jäckel
a7f99ea0e7 nixos/envfs: add extraFallbackPathCommands options
this is mainly useful for restricted platforms like wsl which require
some extra entries in /bin/
2023-02-13 14:55:37 +01:00
Sandro Jäckel
badd06f1cf nixos/envfs: use configured environment.usrbinenv and environment.binsh
Taken from upstream
d91aeefccb
2023-02-13 14:55:37 +01:00
pennae
8b81aebbaf nixos-render-docs: add options manpage converter
mdoc is just too slow to render on groff, and semantic markup doesn't
help us any for generated pages.

this produces a lot of changes to configuration.nix.5, but only few
rendering changes. most of those seem to be place losing a space where
docbook emitted roff code that did not faithfully represent the input
text, though a few places also gained space where docbook dropped them.
notably we also don't need the compatibility code docbook-xsl emitted
because that problem was fixed over a decade ago.

this will handle block quotes, which the docbook stylesheets turned into
a mess of roff requests that ended up showing up in the output instead
of being processed.
2023-02-13 14:55:35 +01:00
pennae
4805cbbce6 nixos/make-options-doc: fix related packages link label
the pkgs path literal surely shouldn't include the title, right?
2023-02-13 14:55:34 +01:00
pennae
2610f45516 nixos/*: remove trailing period in mkEnableOptions
those are added by mkEnableOption, and .. is replaced to … by markdown
processing.
2023-02-13 14:55:34 +01:00
pennae
cb12267aa0 nixos/x11: fix some docs links
the docbook stylesheets duplicated the target of these untitled links
into their label, but we should do that in markdown instead.
2023-02-13 14:55:34 +01:00
K900
0d0560e42f nixos/plasma5: install kio-admin for desktop 2023-02-13 14:55:32 +01:00
Winter
c6eea1fe9e nixos/luksroot: build pbkdf2-sha512 binary in its own derivation
Since this feature's inception, we've compiled a binary that uses OpenSSL
to perform PBKDF-SHA512 during the extra-utils build. In addition to this
being inefficient, it broke as of 6ea1a2a1be,
which switched the extra-utils derivation to use stdenvNoCC.

For now, I think the path of least resistence is to move the pbkdf-sha512
build to its own derivation, to fix the breakage, as well as improving
the efficiency of the extra-utils build.

(I do believe that at some point, we should revisit this binary -- perhaps
rewriting it -- as Clang even just on its default settings emits more
warnings than you'd want to see in a security-related codebase when
compiling it.)
2023-02-13 14:55:28 +01:00
Matt McHenry
e64c18f259 k3b: use cdrecord from cdrtools rather than cdrkit
fixes this warning:

cdrecord <= 2.01.01a05 will be run with root privileges on kernel >= 2.6.8
Since Linux kernel 2.6.8 cdrecord <= 2.01.01a05 will not work when run suid root for security reasons anymore.
2023-02-13 14:55:23 +01:00
Will Fancher
bfbc47b7e9 initrd-ssh: New sshd settings names 2023-02-13 14:55:17 +01:00
Will Fancher
60ed98f364 sshd: Cyphers -> Ciphers 2023-02-13 14:55:17 +01:00
paumr
3e76f5e882 nixos/roundcube: fixed nginx configuration
the changes are required for oauth setups,
and are based on:
https://github.com/roundcube/roundcubemail/issues/8191#issuecomment-919850328
2023-02-13 14:55:08 +01:00
Tim Fenney
88628cf80a doc/nixos: prefer the verb 'log in' (#214616)
* doc/nixos: prefer the term 'login'

Change "re-log" to "login again."

* Update nixos/doc/manual/configuration/xfce.chapter.md

Co-authored-by: Naïm Favier <n@monade.li>

* Change also xml.

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-13 14:55:04 +01:00
rnhmjoj
d501736fc0 nixos/tests/gnupg: init 2023-02-13 14:55:02 +01:00
rnhmjoj
4b5cca60f5 nixos/test-driver: handle decoding errors in Machine.execute
The output of a command is not guaranteed to be valid UTF-8, so the
decoding can fail raising UnicodeDecodeError. If this happens during a
`succeeds` the check will be erroneously marked failed.

This changes the error handling to the "replace" mode, where invalid
codepoints are replaced with � (REPLACEMENT CHARACTER U+FFFD) and the
decoding can go on.
2023-02-13 14:55:02 +01:00
rnhmjoj
027befd08d nixos/test-driver: drop logging from Machine.send_monitor_command
Several machine operations, like `send_chars` and `send_key`, are
implemented by calling `send_monitor_command`, possibly multiple times.
This generates a huge amount of unnecessary noise in the log, because
`send_monitor_command` is a low-level operation and an implementation
detail.

Here's an excerpt from a highlighted log before and afte the change.

Before:

    subtest: Can generate a PGP key
    machine: sending keys 'gpg --gen-key\n'
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey p
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey p, in 0.00 seconds)
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey spc
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey spc, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey g
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey g, in 0.00 seconds)
    machine: sending monitor command: sendkey e
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey e, in 0.00 seconds)
    machine: sending monitor command: sendkey n
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey n, in 0.00 seconds)
    machine: sending monitor command: sendkey 0x0C
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey 0x0C, in 0.00 seconds)
    machine: sending monitor command: sendkey k
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey k, in 0.00 seconds)
    machine: sending monitor command: sendkey e
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey e, in 0.00 seconds)
    machine: sending monitor command: sendkey y
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey y, in 0.00 seconds)
    machine: sending monitor command: sendkey ret
    machine: waiting for monitor prompt
    (finished: waiting for monitor prompt, in 0.00 seconds)
    (finished: sending monitor command: sendkey ret, in 0.00 seconds)
    (finished: sending keys 'gpg --gen-key\n', in 0.15 seconds)

After:

    subtest: Can generate a PGP key
    machine: sending keys 'gpg --gen-key\n'
    (finished: sending keys 'gpg --gen-key\n', in 0.15 seconds)
2023-02-13 14:55:02 +01:00
Googlebot
c55e0b2b85 fix logic 2023-02-13 14:55:02 +01:00
Googlebot
bffc4efcc6 nvidia: Reverse Prime Sync 2023-02-13 14:55:02 +01:00
Janik H
fd3a940590 qdmr: fixup 2023-02-13 14:54:55 +01:00
Vanilla
ece53fc882 nixos/pykms: rename systemd deprecated MemoryLimit to MemoryMax. 2023-02-13 14:54:55 +01:00
Nick Cao
3705889881 nixos/zram: fix default swapDevices 2023-02-13 14:54:53 +01:00
Sandro Jäckel
fc17d0f883 treewide: cleanup some unused bindings 2023-02-13 14:54:52 +01:00
gbtb
01b0855df6 nixos/openvpn: applied nixpkgs-fmt 2023-02-13 14:54:51 +01:00
gbtb
5c9f1ee2db nixos/openvpn: added restartAfterSleep option
Additional systemd unit that hooks to sleep.target and kills openvpn processes
2023-02-13 14:54:51 +01:00
Matthieu Coudron
a083d028dd services.openssh: rename several settings (#211991)
* services.openssh: rename several settings

... to match the sshd config format (makes transition smoother), namely:
services.openssh.forwardX11 -> services.openssh.settings.X11Forwarding
services.openssh.cyphers -> services.openssh.settings.Cyphers
services.openssh.macs -> services.openssh.settings.Macs
services.openssh.kexAlgorithms -> services.openssh.settings.KexAlgorithms
services.openssh.gatewayPorts -> services.openssh.settings.GatewayPorts

* release-notes: mention openssh renaming

* chore: regenerated release-notes
2023-02-13 14:54:49 +01:00
Sandro
d7849e6a8c nixos/nginx: add comment about clearing Connection header (#214211) 2023-02-13 14:54:47 +01:00
Morgan Jones
6b632295a8 nixos/nebula: fix potential address collision in tests 2023-02-13 14:54:47 +01:00
Morgan Jones
15247638dd nixos/nebula: rename test nodes to be more descriptive 2023-02-13 14:54:47 +01:00
Morgan Jones
3b4b7edd3e nixos/nebula: harden systemd unit 2023-02-13 14:54:46 +01:00
Morgan Jones
c673aea520 nixos/nebula: add tests for relays; clean up nebula passthru test 2023-02-13 14:54:46 +01:00
Morgan Jones
43e04dc8eb nixos/nebula: don't run as root; support relays 2023-02-13 14:54:46 +01:00
Yarny0
3bdc15c90a nixos/tests/cups-pdf: fix test with socket-activated cups
The cups-pdf vm test previously waited for the
activation of `cups.service` before testing anything.
This method fails since

47d9e7d3d7

as cups auto-stops if it is not used,
causing the test framework to complain
that `cups.service` will never start.

The commit at hand alters the test so it
simply waits for `multi-user.target`.
We could also switch to `cups.socket`,
but `multi-user.target` seems to be more robust
concerning future changes in the cups mechanisms.
2023-02-13 14:54:46 +01:00
78843f1d07 pgadmin4: 6.18 -> 6.19
Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
2023-02-13 14:54:43 +01:00
Maximilian Bosch
629c2b0e3d privacyidea: fix build
The previous changes for the 3.8 update are ready, but staging got
merged into master, so there are a few more challenges to tackle:

* Use python 3.10 now since it's actually supported and less effort to
  build (3.9 isn't recursed into anymore).
* sphinx doesn't build with these overrides, so patch it out entirely
  (i.e. drop `sphinxHook` where it's causing problems).
* backport a few jinja2 fixes for python 3.10 that were fixed in later
  versions, but break because this env is stuck to 2.11.
2023-02-13 14:54:42 +01:00
Maximilian Bosch
9deaaeda37 nixos/privacyidea: fix db uri
Fixes db migration on 3.8. See also https://github.com/privacyidea/privacyidea/issues/3447
2023-02-13 14:54:42 +01:00
Thomas Gerbet
a93855bbe1 meilisearch: 0.30.5 -> 1.0.0
https://github.com/meilisearch/meilisearch/releases/tag/v1.0.0
2023-02-13 14:54:40 +01:00
lucasew
cda67dcad9 nixos/cockpit: add nixos test
Signed-off-by: lucasew <lucas59356@gmail.com>
2023-02-13 14:54:40 +01:00
lucasew
6036176afc nixos/cockpit: init
Signed-off-by: lucasew <lucas59356@gmail.com>
2023-02-13 14:54:40 +01:00
Izorkin
91572904f2 nixos/no-x-libs: add mc 2023-02-13 14:54:35 +01:00
Jason Yundt
2efe56c271 treewide: fix backwards smart apostrophes
According to the Unicode Standard, you should use U+2019 RIGHT SINGLE
QUOTATION MARK for apostrophes [1]. Before this change, some of the text
in this repo would use U+2018 LEFT SINGLE QUOTATION MARKs instead.

[1]: https://www.unicode.org/versions/Unicode15.0.0/ch06.pdf#G12411
2023-02-13 14:54:32 +01:00