Commit graph

19624 commits

Author SHA1 Message Date
Nikolay Amiantov e8daaa85d4
Merge pull request #153589 from abbradar/uwsgi-fixes
uWSGI configuration generation fixes
2022-01-09 09:49:05 +03:00
Nikolay Amiantov f2c5970a76 users-groups service: add autoSubUidGidRange option
Previously we allocated subuids automatically for all normal users.
Make this explicitly configurable, so that one can use this for system
users too (or explicitly disable for normal users). Also don't allocate
automatically by default if a user already has ranges specified statically.
2022-01-09 09:43:55 +03:00
Frank Doepper 0098575c86
nixos/frr: init
- old quagga service and test adapted to frr

Co-Authored-By: Martin Weinelt <hexa@darmstadt.ccc.de>
2022-01-09 04:12:55 +01:00
Sandro 8aeafc25c9
Merge pull request #154054 from SuperSandro2000/prometheus-bearer-token 2022-01-09 01:48:43 +01:00
Ben Wolsieffer f5e0f2932e sshd: disable trigger limit for systemd socket
When startWhenNeeded is enabled, a brute force attack on sshd will cause
systemd to shut down the socket, locking out all SSH access to the machine.
Setting TriggerLimitIntervalSec to 0 disables this behavior.
2022-01-08 19:48:37 -05:00
Sandro Jäckel 39ce4ddd85
nixos/prometheus: fix usage of bearer_token 2022-01-08 22:56:51 +01:00
Winter b52607f43b nixos/acme: ensure web servers using certs can access them 2022-01-08 15:05:34 -05:00
Robert Hensing 32356ce11b
Merge pull request #153867 from astro/stunnel
stunnel: allow servers to connect to other hosts
2022-01-08 20:49:48 +01:00
Robert Hensing f80f85f228
Merge pull request #154015 from pennae/fix-docs-cross
nixos/documentation: fix docs cross build
2022-01-08 20:44:05 +01:00
Robert Hensing d75b85c5dc
Merge pull request #147690 from pasqui23/hosts
concatTextFile: init
2022-01-08 20:40:31 +01:00
Florian Klink 982de405d7
Merge pull request #153901 from flokli/sniproxy-logdir
nixos/sniproxy: remove unused logDir option
2022-01-08 20:07:57 +01:00
pennae 9d3ba92d63 nixos/documentation: fix docs cross build
a few things should've used buildPackages/nativeBuildInputs to not not require
the host architecture for building docs. tested by building aarch64-linux docs
on x86_64-linux, and the result looks good.
2022-01-08 16:03:23 +01:00
Thomas Dy 97864e984d nixos/kubernetes: actually set containerd to use systemd cgroups
The correct configuration is listed in the kubernetes documentation
https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd-systemd

The correct option can also be seen in `containerd config default`
2022-01-08 17:29:32 +10:00
pennae 2d356a1969 nixos/kubernetes: move all k8s docs out of the sandbox
otherwise the manual won't build.

ideally they'll move back into the sandbox at some point, but we're
obviously not qualified to put them there.
2022-01-08 17:13:27 +10:00
pennae 635376d3af Revert "nixos/kubernetes: make lib option internal and readonly"
This reverts commit 7e28421e17.
2022-01-08 17:13:27 +10:00
Jan Tojnar 283c47bc45
Merge pull request #150548 from K900/wireplumber
wireplumber: init, add NixOS module
2022-01-08 06:11:59 +01:00
Jan Tojnar 0c4ccc29ce
Merge pull request #153840 from bobby285271/gsd
nixos/gnome-settings-daemon: pick up correct .wants directories
2022-01-08 06:07:14 +01:00
Bobby Rong 84ad67f7c6
nixos/gnome-settings-daemon: pick up correct .wants directories
In https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/153
the user target names for GSD components has been renamed for example
from `gsd-a11y-settings.target` to `org.gnome.SettingsDaemon.A11ySettings.target`,
and nowadays `gsd-*.target` are just symbolic links of `/dev/null` and will be
removed in the future.

At the same time, as mentioned in d27212d466,
we are adding `systemd.user.targets.<name>.wants` stuff here only because
systemd.packages doesn't pick the .wants directories. Nowadays those GSD components
are managed in `/etc/systemd/user/gnome-session@gnome.target.d/gnome.session.conf`
so it should be safe to remove them.

In this commit we also try to pick up those new .wants directories, see also
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/blob/41.0/plugins/meson.build#L57

Result of `cd /nix/store/iqzy2a6wn9bq9hqx7pqx0a153s5xlnwp-gnome-settings-daemon-41.0; find | grep wants`:

```
./share/systemd/user/gnome-session-x11-services-ready.target.wants
./share/systemd/user/gnome-session-x11-services-ready.target.wants/org.gnome.SettingsDaemon.XSettings.service
./share/systemd/user/gnome-session-x11-services.target.wants
./share/systemd/user/gnome-session-x11-services.target.wants/org.gnome.SettingsDaemon.XSettings.service
```

Result of `cd /nix/store/armzljlnsvc1gn0nq0bncb9lf8fy32zy-gnome-settings-daemon-3.34.0; find | grep wants`:

```
./lib/systemd/user/gnome-session-initialized.target.wants
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-a11y-settings.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-color.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-datetime.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-power.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-housekeeping.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-keyboard.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-media-keys.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-screensaver-proxy.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-sharing.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-sound.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-smartcard.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-wacom.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-print-notifications.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-rfkill.target
./lib/systemd/user/gnome-session-initialized.target.wants/gsd-wwan.target
./lib/systemd/user/gnome-session-x11-services.target.wants
./lib/systemd/user/gnome-session-x11-services.target.wants/gsd-xsettings.target
```
2022-01-08 10:19:02 +08:00
Florian Klink 6a75955c21 nixos/sniproxy: remove unused logDir option
This never configured where SNI should log to, as it's up to the user to
provide the full sniproxy config (which can be configured to log to a
file).

This option only produced a ExecStartPre script that created the folder.

Let's use LogsDirectory to create it. In case users want to use another
directory for logs, they can override LogsDirectory or set their own
ExecStartPre script.
2022-01-07 22:40:12 +01:00
Maciej Krüger 801d832872
Merge pull request #125451 from zhaofengli/qemu-riscv64-sd-image 2022-01-07 22:14:05 +01:00
Astro 422c5a5db5 stunnel: allow servers to connect to other hosts 2022-01-07 17:54:01 +01:00
K900 4909a15582 nixos/wireplumber: init
This is extremely basic for now, but we can add more stuff later
2022-01-07 17:34:28 +03:00
Aaron Andersen 2e95239bd1
Merge pull request #153729 from aanderse/nixos/caddy
nixos/caddy: add globalConfig option
2022-01-07 08:35:07 -05:00
Zhaofeng Li 2cb7743e9c sd-image-x86_64: init 2022-01-06 17:31:17 -08:00
Zhaofeng Li b70c23ea61 sd-image: Propagate imageName to derivation 2022-01-06 17:31:17 -08:00
Zhaofeng Li 823acb25dd sd-image-riscv64-qemu: init 2022-01-06 17:23:10 -08:00
Zhaofeng Li 16a907b00b generic-extlinux-compatible: Allow disabling generation of device tree directives 2022-01-06 17:23:10 -08:00
Zhaofeng Li d7cdd09ad2 all-hardware: Add virtio_mmio module 2022-01-06 17:23:10 -08:00
Zhaofeng Li 41cad5ea68 all-hardware: Disable VMWare and Hyper-V modules on non-X86 platforms 2022-01-06 17:23:10 -08:00
Aaron Andersen 5dc2454267
Merge pull request #153706 from ymarkus/bookstack-module
nixos/bookstack: fix setup service
2022-01-06 15:09:27 -05:00
0x4A6F 29acc14f0d
Merge pull request #143060 from zhaofengli/binfmt-argv0
nixos/binfmt: Add QEMU wrapper to preserve argv[0]
2022-01-06 19:21:47 +01:00
Aaron Andersen ea0d11e503
Merge pull request #153745 from mohe2015/wordpress-no-directory-indexes
nixos/wordpress: Disable directory indexes
2022-01-06 13:12:54 -05:00
Moritz Hedtke bb358d6566
nixos/wordpress: Disable directory indexes
Fixes #151159
Confirmed using path http://localhost/wp-includes/
2022-01-06 18:04:19 +01:00
Aaron Andersen 45477f7ce5 nixos/caddy: add globalConfig option 2022-01-06 09:25:58 -05:00
Yannick Markus 7f2bc1d736
nixos/bookstack: fix setup service 2022-01-06 11:56:43 +01:00
Robert Hensing 265fe132e6
Merge pull request #153620 from pennae/fix-installer-tests
nixos-install: copy channels before system eval
2022-01-06 11:34:55 +01:00
Martin Weinelt 9b708d814b
Merge pull request #153625 from Mic92/tinc 2022-01-06 00:42:57 +01:00
Jörg Thalheim 989238ec03
Merge pull request #153426 from 4z3/systemwide-pipewire
nixos/pipewire: add systemWide option
2022-01-05 21:33:07 +00:00
legendofmiracles 86f45c7c6f
ArchiSteamFarm: 5.2.0.9 -> 5.2.0.10; ASF-ui: update 2022-01-05 14:09:24 -06:00
legendofmiracles bf30cd48ed
nixos/archisteamfarm: init 2022-01-05 14:09:23 -06:00
José Romildo Malaquias 75e9b9b058
Merge pull request #153472 from romildo/upd.ecrire
enlightenment.ecrire: init at 0.2.0
2022-01-05 16:00:50 -03:00
Wael Nasreddine 1a4a216bf5
onlykey: set the group correctly in the udev rule (#153618) 2022-01-05 10:29:37 -08:00
Jörg Thalheim db2953eb19 nixos/tinc: add mic92 maintainer 2022-01-05 19:29:01 +01:00
pennae 3ad8f52de0 nixos-install: copy channels before system eval
since fc614c37c6 nixos needs access to its
own path (<nixpkgs/nixos>) to evaluate a system with documentation.
since documentation is enabled by default almost all systems need such
access, including the installer tests. nixos-install however does not
ensure that a channel exists in the target store before evaluating the
system in that store, which can lead to `path is not valid` errors.
2022-01-05 18:38:49 +01:00
Vladimír Čunát 180213a0ac
nixos/kresd: fix IPv6 scope syntax
The systemd syntax is suprising to me, but I suppose it's worth being
compatible as people might be sharing it with other modules.
Our regexp is lenient on IPv6 address part, so this is actually
backwards compatible (i.e. you can put the scope at either place).
2022-01-05 15:58:27 +01:00
kraem 893ffee286
Revert "nixos/documentation: avoid copying nixpkgs subpaths"
builtins.storePath is not allowed in pure evaluation mode

This reverts commit 1511e72b75.
2022-01-05 12:36:54 +01:00
Nikolay Amiantov 2be5e93ecc uwsgi service: deduplicate plugins list
Duplicates can lead to unnecessary `uwsgi` rebuilds and conflicts.
2022-01-05 14:18:59 +03:00
Nikolay Amiantov 4be78f0dd3 uwsgi service: redefine PATH envvar
Previously if user had `PATH` variable set we would define several
`PATH` variables and trigger a conflict.
2022-01-05 14:18:59 +03:00
Aaron Andersen 6b1102d94b
Merge pull request #152029 from CRTified/adguard-settings
nixos/adguardhome: Add settings option
2022-01-04 19:19:18 -05:00
Robert Hensing 70d27303da
Merge pull request #149532 from pennae/split-docs-build
nixos/*: split docs build
2022-01-04 22:33:23 +01:00
Jan Tojnar dafaecb3b9 nixos/gvfs: fix libmtp udev package path for realz
bin is the primary output so the previous attempt at fixing this
(2d7fc66c79)
was a no-op.
2022-01-04 19:22:05 +01:00
tv 7678a5848c nixos/pipewire: add systemWide option 2022-01-04 16:07:07 +01:00
José Romildo 676ffe1f39 nixos/enlightenment: add ecrire to system packages 2022-01-04 09:52:56 -03:00
Jörg Thalheim 0432195a4b
Merge pull request #153314 from Mic92/prometheus
prometheus: add authorization section
2022-01-04 08:34:51 +00:00
Jan Tojnar 3c1b474e44 nixos/tracker: Define env var so it can find miners’ subcommands
tracker looks in its directory tree for executable files
to make available as subcommands. Users expect to find subcommands
from tracker-miners package but that fails as they are in different
tree. We also cannot change the lookup path since tracker-miners
also depends on a library from tracker package.

Until we can break the dependency cycle on package level:

   tracker -> tracker-miners -> tracker-sparql (tracker)

we need to work around it. I chose to set an environment
variable that overrides the subcommands lookup to a tree
symlinking files from both packages in GNOME NixOS module.

https://gitlab.gnome.org/GNOME/tracker/-/issues/341
Fixes: https://github.com/NixOS/nixpkgs/issues/153378
2022-01-03 22:25:03 +01:00
Aaron Andersen 3440425750
Merge pull request #152455 from erdnaxe/minecraft_hardening
nixos/minecraft-server: systemd unit hardening
2022-01-03 12:24:05 -05:00
Aaron Andersen bf607abf73
Merge pull request #152223 from ju1m/logrotate
nixos/logrotate: enable multiple paths per entry
2022-01-03 12:11:12 -05:00
piegames ae040631c9
Merge pull request #142758: Add Heisenbridge module 2022-01-03 18:05:55 +01:00
piegames 4d69ad4b1f nixos/heisenbridge: Init 2022-01-03 15:40:40 +01:00
Philipp 3d47865f7f nixos/matrix-conduit: init 2022-01-03 15:36:56 +01:00
Jörg Thalheim fd0a6311a7 prometheus: add authorization section 2022-01-03 12:04:08 +01:00
Robert Schütz c020d0af17
Merge pull request #153151 from mweinelt/python2-removals
Remove applications that depend on python2Packages
2022-01-03 09:43:43 +00:00
Andrew Marshall f62c11fcc3 nixos/pam: Fix apparmor syntax error
When running e.g. `aa-genprof` get error:

> ERROR: Syntax Error: Unknown line found in file /etc/apparmor.d/abstractions/pam line 26:
>     r /nix/store/XXXXX.pam,mr /nix/store/XXXXX-linux-pam-1.5.1/lib/security/pam_filter/*,

So add an explicit newline as concatMapStringsSep only adds them
between.
2022-01-02 22:51:26 -05:00
Aneesh Agrawal 8729e8e261 nixos/restic-rest-server: Autocreate empty .htpasswd if needed for service boot
When `privateRepos = true`, the service will not start if the `.htpasswd` does not exist.
Use `systemd-tmpfiles` to autocreate an (empty) file to ensure the service can boot
before actual `htpasswd` contents are registered.

This is safe as restic-rest-server will deny all entry if the file is empty.
2022-01-02 21:13:07 -05:00
Naïm Favier ec150abd1a
Revert "nixos/nginx: disable rejectSSL activation when https is disabled"
This reverts commit 2f66ac01e9.
2022-01-02 21:01:29 +01:00
pennae 1511e72b75 nixos/documentation: avoid copying nixpkgs subpaths
the docs build should work well even when called from a git checkout of
nixpkgs, but should avoid as much work as possible in all cases.
if pkgs.path is already a store path we can avoid copying parts of it
into the docs build sandbox by wrapping pkgs.path in builtins.storePath
2022-01-02 19:46:13 +01:00
pennae 50954ad1c5 nixos/make-options-doc: treat missing descriptions as errors by default
this partially solves the problem of "missing description" warnings of the
options doc build being lost by nix build, at the cost of failing builds that
previously ran. an option to disable this behaviour is provided.
2022-01-02 19:46:13 +01:00
pennae 1301bdb185 nixos/make-options-doc: turn relatedPackages into links
link to search.nixos.org instead of pulling package metadata out of pkgs. this
lets us cache docs of a few more modules and provides easier access to package
info from the HTML manual, but makes the manpage slightly less useful since
package description are no longer rendered.
2022-01-02 19:46:13 +01:00
pennae fc614c37c6 nixos/documentation: split options doc build
most modules can be evaluated for their documentation in a very
restricted environment that doesn't include all of nixpkgs. this
evaluation can then be cached and reused for subsequent builds, merging
only documentation that has changed into the cached set. since nixos
ships with a large number of modules of which only a few are used in any
given config this can save evaluation a huge percentage of nixos
options available in any given config.

in tests of this caching, despite having to copy most of nixos/, saves
about 80% of the time needed to build the system manual, or about two
second on the machine used for testing. build time for a full system
config shrank from 9.4s to 7.4s, while turning documentation off
entirely shortened the build to 7.1s.
2022-01-02 19:46:13 +01:00
Aaron Andersen 1b4bdf523a
Merge pull request #146795 from Madouura/dev/tetrd
tetrd: init at 1.0.4
2022-01-02 11:53:03 -05:00
Sandro 46056f6c36
Merge pull request #122460 from ju1m/croc 2022-01-02 15:56:58 +01:00
Martin Weinelt 15f577daaa
couchpotato, nixos/couchpotato: remove
Using python2 and abadoned upstream in 2020, last release in 2015.
2022-01-02 13:38:11 +01:00
Renaud 0f47e95588
Merge pull request #153036 from aidalgol/firejail.wrappedBinaries-clarification
firejail: clarify wrappedBinaries option description
2022-01-02 11:06:17 +01:00
Bobby Rong b38cf64f82
Merge pull request #152140 from yesbox/i2pd
nixos/i2pd: add module package option
2022-01-02 09:00:35 +08:00
Martin Weinelt b8149a7f04
Merge pull request #152907 from dotlambda/python2-remove 2022-01-02 01:33:57 +01:00
Madoura e16074e889
nixos/tetrd: init 2022-01-01 17:43:37 -06:00
Jesper Geertsen Jonsson 9268da6b04 nixos/i2pd: add module package option 2022-01-01 23:16:40 +01:00
Aaron Andersen 34c283deda
Merge pull request #150846 from onny/maddy
nixos/maddy: Better description, user and group handling
2022-01-01 15:05:42 -05:00
Guillaume Girol fdc3784828
Merge pull request #148637 from hexagonal-sun/network/gre-tap-tun
nixos/network: add gre virtual interfaces
2022-01-01 17:04:29 +00:00
José Romildo a31ae59bb2 lumina.lumina: lumina-checkpass is postponned by upstream 2022-01-01 10:12:31 -03:00
Aidan Gauland 82dd41e74d firejail: clarify wrappedBinaries option description
I had trouble getting programs.firejail.wrappedBinaries to have any effect on my
system (#152852), because I did not realise that "put[ting] the actual
application binary in the global environment" included adding the program
package to environment.systemPackages, and I thought that the package must be
present for this option to take effect.  I have added a clarifying parenthetical
statement explicitly mentioning environment.systemPackages in this caveat.
2022-01-01 18:13:21 +13:00
Morgan Jones 38ee2de29d nixos/mattermost: update service for 6.0+ 2021-12-31 23:49:00 -05:00
Morgan Jones c37cb3b243 nixos/mattermost: silence startup warnings from chmod/chown; improve API 2021-12-31 23:49:00 -05:00
Morgan Jones 7cf6855c7f nixos/mattermost: Simplify plugin derivation build, improve startup perf 2021-12-31 23:49:00 -05:00
Morgan Jones 73fc80e0d7 nixos/mattermost: Support declarative Mattermost plugins 2021-12-31 23:49:00 -05:00
Morgan Jones 174b340406 nixos/mattermost: add preferNixConfig option and tests
One use case for Mattermost configuration is doing a "mostly
mutable" configuration where NixOS module options take priority
over Mattermost's config JSON.

Add a preferNixConfig option that prefers configured Nix options
over what's configured in Mattermost config if mutableConfig is set.

Remove the reliance on readFile (it's flake incompatible) and use
jq instead.

Merge Mattermost configs together on Mattermost startup, depending
on configured module options.

Write tests for mutable, mostly mutable, and immutable configurations.
2021-12-31 23:49:00 -05:00
Martin Weinelt 5ecf13007d
nixos/mwlib: remove
Built upon python2 only dependencies that were marked broken since 2019.
2022-01-01 02:09:11 +01:00
Robert Schütz f8b4cf08fe
syncserver, nixos/syncserver: remove
They have been broken for multiple releases.
2022-01-01 02:09:10 +01:00
Robert Schütz a859ef91f0
trac, nixos/trac: remove
They have been broken for multiple releases.
2022-01-01 02:09:09 +01:00
Martin Weinelt 5dd90167ce nixos/moinmoin, nixos/tests/moinmoin, python2Packages.moinmoin: remove
Stuck on python2 and the NixOS test has been failing for 6 months.
2021-12-31 16:39:24 -08:00
Ivan Jager 0d7fc6f090 nixos/hardware/rtl-sdr: Fix description 2021-12-31 10:24:55 -06:00
Ivan Jager ca0fbf9739 nixos/hardware/hackrf: new module
This is a very this module to enable the
hackrf udev rules and ensure the "plugdev"
group they use exists.
2021-12-31 10:24:49 -06:00
Michele Guerini Rocco 59bfda7248
Merge pull request #152594 from ju1m/apparmor
security/wrappers: remove C compiler from the nixos/security.wrappers…
2021-12-31 15:09:52 +01:00
sternenseemann adfbfc0397 nixos/mandoc: add package option 2021-12-31 11:17:34 +01:00
sternenseemann 4942248a40 nixos/man-db: add package option 2021-12-31 11:17:34 +01:00
sternenseemann f4f7238860 nixos/mandoc: init
Adds a NixOS module which allows using mandoc as the main manual
viewer. It can be used as a drop-in replacement for documentation.man
which relies on GNU's man-db and provides more or less the same
features.

The generateCaches option requires a different implementation for
mandoc, so it is hard to share code between the two modules -- hence it
has been implemented separately. Using both at the same time makes
little sense and wouldn't quite work, so there's an assertion to
prevent it.

To make makewhatis(8) index manual pages which are symlinks to the nix
store, we need to set READ_ALLOWED_PATH to include
`builtins.storeDir`. For background and discussion see:
https://inbox.vuxu.org/mandoc-tech/c9932669-e9d4-1454-8708-7c8e36967e8e@systemli.org/T/
2021-12-31 11:17:34 +01:00
sternenseemann bcc4c34640 nixos/documentation: properly reference apropos(1), mention man -k
man -k is useful to mention as it is -- in constrast to apropos(1) --
actually required by POSIX.
2021-12-31 11:17:34 +01:00
sternenseemann 6a3d020b90 nixos/documentation: move man-db-specifics into new man-db module
It may be possible to revert the move of `documentation.man.manualPages`
later. The problem is that other man implementations (mandoc) want to
generate their index databases in place, so the approach taken here
doesn't translate super well.
2021-12-31 11:17:34 +01:00
Michael Hoang 1783cfde53 nixos/nixos-enter: Don't passthru TMPDIR
`mktemp` tries to use the `TMPDIR` from `nixos-install` outside of the
`chroot` instead of `/tmp` inside the `chroot` and fails. For some
reason the `TMPDIR` is being passed through the `chroot` call.

I haven't tested if other environment variables are being passed through
that shouldn't be.
2021-12-31 10:10:14 +11:00
Jean-Philippe Cugnet 40fb59cfc3
nixos/elasticsearch: fix postStart to allow non-localhost listenAddress
Before this fix, if the listenAddress is set to something else than 127.0.0.1,
the service fails to detect that Elasticsearch has properly started and stop.
2021-12-30 19:03:35 +01:00