Commit Graph

31672 Commits

Author SHA1 Message Date
Vanilla
844ff435f5 nixos/virtualisation/linode-image: Migrate to new openssh options. 2023-02-13 14:59:03 +01:00
Moritz 'e1mo' Fromm
166ff19144 nixos/dokuwiki: remove last reference to aclUse
This was overlooked in #209299, but will throw a trace when building a
system even when the setting was not set.
2023-02-13 14:59:00 +01:00
Marin
2bffc1adf1 nixos/yubikey-agent: Add dependency to pcsd.service
Issue: after installing, running `yubikey-agent -setup` produces the
following error:
```
nixOS: Failed to connect to the YubiKey: connecting to pscs: the Smart
card resource manager is not running
```

More on this issue: https://github.com/FiloSottile/yubikey-agent/issues/137
2023-02-13 14:58:55 +01:00
Andreas Stührk
324fda3bac nixos/envoy: add option requireValidConfig to make config validation errors non-fatal
Co-authored-by: Vincent Haupert <vincent@yaxi.tech>
2023-02-13 14:58:53 +01:00
Vincent Haupert
35c8e5ed44 nixos/envoy: add package option 2023-02-13 14:58:52 +01:00
Vincent Haupert
91cc3b6663 nixos/envoy: further service hardening 2023-02-13 14:58:52 +01:00
Vincent Haupert
ff072ba6f8 nixosTests.envoy: use port 80 to test CAP_NET_BIND_SERVICE 2023-02-13 14:58:52 +01:00
Vincent Haupert
5641378f1c nixos/envoy: sort serviceConfig entries 2023-02-13 14:58:52 +01:00
Vincent Haupert
6905ec0d57 nixos/envoy: use lists in serviceConfig where appropriate
Using type `list` instead of `str` in `serviceConfig` entries which
accept multiple values allows easier extension of the unit
configuration.
2023-02-13 14:58:52 +01:00
Craig Hall
12ee6776f5 nixos/hostapd: Enable 802.11n / 802.11ac by default 2023-02-13 14:58:37 +01:00
Craig Hall
0975fe9d3c nixos/hostapd: Disable insecure TKIP by default
It's possible that setting wpa=2 disables TKIP anyway, but on my machine
I could not get 802.11n to work without setting rsn_pairwise=CCMP.
N.B. rsn_pairwise takes its default from wpa_pairwise.
2023-02-13 14:56:50 +01:00
Craig Hall
f35c374a33 nixos/hostapd: Remove blank default for cfg.interface
Leaving this blank leads to a confusing error about systemd unit dependencies.
2023-02-13 14:56:50 +01:00
Tom Hubrecht
461ae37eff nixos/onlyoffice: Fix initial permissions for the documentserver data 2023-02-13 14:56:37 +01:00
nikstur
af06e0562f nixos/systemd-repart: init 2023-02-13 14:56:36 +01:00
bb2020
3f60856c7b nixos/udisks2: add mountOnMedia option 2023-02-13 14:56:32 +01:00
1sixth
bac42c66aa nixos/nitter: add replaceReddit option 2023-02-13 14:56:24 +01:00
pennae
56e16e045b nixos/manual: remove md-to-db
with manual chapters no longer needing pandoc for their conversion to
xml we can get rid of this source of confusion, and its huge cache of
xml files.
2023-02-13 14:56:23 +01:00
pennae
20496e818f nixos-render-docs: render manual chapters during manual build
render all manual chapters to docbook from scratch every time the manual
is built. nixos-render-docs is quick enough at this to not worry about
the cost (needing only about a second), and it means we can remove
md-to-db.sh in the next commit.

no changes to the rendered html manual except for replacements and smartquotes.
2023-02-13 14:56:23 +01:00
pennae
4aa30e9ca2 nixos-render-docs: rename manual docbook converter to docbook-section
we'll soon add another docbook converter that does not emit a section as
a collection of chapters, but sections or chapters on their own. this
should clarify naming a bit before there can be any confusion.
2023-02-13 14:56:22 +01:00
pennae
fd8507ae04 nixos/manual: convert <kbd> elements to bracketed spans
since support for kbd elements was added with explicit intent in #175128
it seems like a good idea to support this in nixos-render-docs instead
of just dropping it in favor of `*F12*` etc. since it's a very rare
thing in the manual and purely presentational it makes sense to use
bracketed spans instead of a new myst role.

the html-elements.lua plugin is now somewhat misnamed, but it'll go away
very soon so we don't want to bother renaming it.
2023-02-13 14:56:21 +01:00
pennae
50aeab1d05 nixos/manual: inline the single footnote
this is a lot easier than adding footnote support for just the one
instance. if a use case for footnotes appears in the future (e.g. if we
wanted to render the nixpkgs manual with nixos-render-docs as well) this
decision should be reevaluated.
2023-02-13 14:56:21 +01:00
pennae
1f9d37c1fb nixos/manual: remove remaining docbook tags
there's one remaining instance of literal docbook tags in the manual.
replace it with a literal (as has been done for package tags everywhere else).
2023-02-13 14:56:21 +01:00
pennae
214cf45e23 nixos/manual: replace ids on blocks with inline anchors
nixos-render-docs supports inline anchors, but not ids for blocks. it
seems wise to reserve blocks for special cases that don't have other
syntax already, like admonitions.
2023-02-13 14:56:21 +01:00
pennae
5ee75bb8cb nixos/manual: remove .unnumbered section attributes
pandoc would drop these when converting to docbook, just like it dropped
.title block classes.
2023-02-13 14:56:21 +01:00
pennae
ca6c381247 nixos/manual: remove .title fenced divs
pandoc drops .title classes when rendering to docbook, so these are
effectively just paragraphs anyway. without support for including them
in a table of contents the complexity of parsing them in
nixos-render-docs won't be warranted.
2023-02-13 14:56:21 +01:00
pennae
46465983e4 nixos/manual: fix option-declarations sections
the examples for mkPackageOption weren't terminated, leading to pretty
odd nesting of docbook (and thus html) elements. close them properly.

also turn the (likewise unclosed) fenced div containing just an anchor
id and a class that will be silently dropped to an inline anchor while
we're here. we'd have to convert it anyway later.
2023-02-13 14:56:21 +01:00
pennae
267b825c4a nixos/manual: remove some newlines from deflists
markdown-it parses deflists slitghtly differently than pandoc does. in
these two cases pandoc would find a deflist item while markdown-it would
not, instead it'd find a lone colon and the rest of the text.
2023-02-13 14:56:21 +01:00
pennae
d060a9991c nixos/manual: don't use multi-definitions in installer chapter
pandoc renders these to multiple docbook paragraphs in a single
definition for the term, not multiple *actual* definitions for the same
term. this is most likely not what is intended here, so let's use
multiple paragraphs instead.
2023-02-13 14:56:20 +01:00
pennae
fd3fd209d2 nixos/manual: delete disabled xincludes
userconfiguration.xml hasn't existed for a while, and this comment will
interfere with processing we'll be doing shortly.
2023-02-13 14:56:20 +01:00
pennae
b0f721d690 nixos/manual: moving contributing chapter toc entry
this should be placed before the appendices, not between them. might
even have a good place in the development part, but that's a decision
for another day.
2023-02-13 14:56:20 +01:00
pennae
d372ad1032 nixos/manual: remove sources input from manpages drv
it's not used. holdover from when manpages were written in docbook.
2023-02-13 14:56:20 +01:00
bb2020
631fe8d943 nixos/minidlna: minor changes 2023-02-13 14:56:12 +01:00
Alper Çelik
b15d6812fc nixos/plasma5: use vlc phonon backend by default 2023-02-13 14:56:10 +01:00
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