Commit graph

2395 commits

Author SHA1 Message Date
Maciej Krüger 3f062397a5
x2goserver: fix rename whole module 2021-06-11 09:07:23 +02:00
Maciej Krüger 6dbeea0b40
nixos/x2goserver: put into networking, like xrdp 2021-06-11 08:13:49 +02:00
Maciej Krüger 03071fd5e3
nixos/xrdp: add openFirewall option 2021-06-11 08:13:48 +02:00
Alyssa Ross 926765c5e3
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	pkgs/servers/http/apache-httpd/2.4.nix
2021-06-11 02:05:00 +00:00
Milan Pässler 55cd291bbd pleroma-otp: remove 2021-06-10 22:53:00 +02:00
Jan Tojnar ba733d435b
Merge branch 'staging-next' into staging 2021-06-10 14:07:45 +02:00
rnhmjoj 336130a90f
nixos/gale: remove
This should have been removed along the package in 3f7d959.
2021-06-10 02:33:10 +02:00
github-actions[bot] e40e33d9d8
Merge staging-next into staging 2021-06-08 18:16:30 +00:00
Kevin Cox af51d70857
nixos/networkmanager: Add connectionConfig. (#118308)
Adds the `networking.networkmanager.connectionConfig` option which allows setting arbitrary settings inside the `[connection]` section.

This also reworked the underlying representation significantly to be less string-pasting and more semantic. In a future step it probably makes sense to provide raw access to other sections to users rather than replying on `extraConfig`. However I decided to defer this primarily because ordering of sections can matter. (Although IIUC this is only true for different `[connection]` sections). I think in the future we could expose an object where users can define/edit all sections and map the current configuration onto those. For now however only `[connection]` is exposed and the rest are just used internally.
2021-06-08 11:13:59 -04:00
rnhmjoj be01320a6c
nixos/wireless: only warn for no interfaces
A hard failure breaks the NixOS installer, which can't possibly
know the interface names in advance.
2021-06-08 07:42:34 +02:00
rnhmjoj eba5f5c1e5
Revert "nixos/wireless: make wireless.interfaces mandatory"
This reverts commit 030a521adc.
2021-06-07 15:55:58 +02:00
Christine Dodrill 2b220cc57b nixos/tailscale: add procps to $PATH
Currently tailscaled expects `sysctl` (from package procps) to be present
in the path when running on Linux. It can function without the `sysctl`
command present but it prints an error about it. This fixes that error.

    Warning: couldn't check net.ipv4.ip_forward (exec: "sysctl":
        executable file not found in $PATH).

Signed-off-by: Christine Dodrill <me@christine.website>
2021-06-06 14:17:03 +00:00
github-actions[bot] 385224957b
Merge staging-next into staging 2021-06-06 12:14:34 +00:00
Michele Guerini Rocco 78d9a75d9e
Merge pull request #125288 from rnhmjoj/wpa-race-fix
nixos/wireless: make wireless.interfaces mandatory
2021-06-06 10:35:15 +02:00
Sandro ef45f53bc9
Merge pull request #106465 from jerith666/globalprotect-vpn 2021-06-05 16:40:21 +02:00
github-actions[bot] 0b0d0c21ec
Merge staging-next into staging 2021-06-04 13:00:29 +00:00
Maximilian Bosch 951e6988ac
Merge pull request #104543 from chkno/sftpServerExecutable
nixos/sshd: Option to set the sftp server executable
2021-06-04 10:16:20 +02:00
Matt McHenry e2b7cfedd6 globalprotect-openconnect: init at 1.2.6
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Co-authored-by: sterni <sternenseemann@systemli.org>
2021-06-02 19:22:13 -04:00
rnhmjoj 030a521adc
nixos/wireless: make wireless.interfaces mandatory
This is the only way to solve issue #101963, for now.
2021-06-01 23:19:40 +02:00
Daniel Nagy e57465a617
nixos/monero: set port type to types.port 2021-05-30 14:38:20 +02:00
Daniel Nagy 65b32a0afe
nixos/syncserver: set port type to types.port 2021-05-30 14:38:19 +02:00
Daniel Nagy 048c45679f
nixos/gitDaemon: set port type to types.port 2021-05-30 14:38:19 +02:00
Marc 'risson' Schmitt 6b12cff0b5
nixos/unbound: fix define-tag option
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2021-05-29 18:00:44 +02:00
Niklas Hambüchen d344dccf3d nixos/wireguard: Remove .path systemd unit for privkey. Fixes #123203
As per `man systemd.path`:

> When a service unit triggered by a path unit terminates
> (regardless whether it exited successfully or failed),
> monitored paths are checked immediately again,
> **and the service accordingly restarted instantly**.

Thus the existence of the path unit made it impossible to stop the
wireguard service using e.g.

    systemctl stop wireguard-wg0.service

Systemd path units are not intended for program inputs such
as private key files.
This commit simply removes this usage; the private key is still
generated by the `generateKeyServiceUnit`.
2021-05-28 17:44:19 -07:00
Martin Weinelt fcd6d0bc14
Merge pull request #124263 from Lassulus/solanum3
solanum: remove obsolete BANDB settings/patches
2021-05-25 20:51:32 +02:00
Sandro Jäckel 140828ce38
nixos/kresd: tell resolveconf to use local resolver 2021-05-25 16:37:00 +02:00
Niklas Hambüchen 83a8acc392
Merge pull request #121331 from nh2/wireguard-dynamicEndpointRefreshSeconds
nixos/wireguard: Add `dynamicEndpointRefreshSeconds` option
2021-05-24 21:49:05 +02:00
lassulus 8eb5701aaf solanum: remove obsolete BANDB settings/patches 2021-05-24 15:49:57 +02:00
Martin Weinelt 71fb79ee6b
Merge pull request #123828 from Lassulus/solanum2
nixos/solanum: init
2021-05-21 23:23:01 +02:00
lassulus 48c16e48aa nixos/solanum: init 2021-05-21 23:06:38 +02:00
eyJhb 6000f420e8
nixos/znc: fixed chown not working after hardening (#123883) 2021-05-21 19:07:53 +02:00
ajs124 c455f3ccaf
Merge pull request #123084 from Yarny0/hylafax
hylafaxplus & nixos/hylafax: small improvements
2021-05-21 14:20:57 +02:00
Jonas Chevalier 30c021fa15
Merge pull request #123744 from hercules-ci/init-ghostunnel
ghostunnel: init
2021-05-20 20:58:41 +02:00
Robert Hensing dc9cb63de4 nixos/ghostunnel: init 2021-05-20 10:41:52 +02:00
Paul Schyska 69202853ea
nixos/nsd: make nsd-checkconf work when configuration contains keys 2021-05-19 18:21:10 +02:00
Michele Guerini Rocco 376eabdac3
Merge pull request #123254 from rnhmjoj/ipsec
libreswan: 3.2 -> 4.4
2021-05-19 13:36:04 +02:00
Maciej Krüger 7458dcd956
Merge pull request #75242 from mkg20001/cjdns-fix
services.cjdns: add missing, optional login & peerName attribute
2021-05-18 18:22:29 +02:00
Robert Schütz d189df235a
Merge pull request #122241 from dotlambda/znc-harden
nixos/znc: harden systemd unit
2021-05-18 17:44:14 +02:00
Maciej Krüger 7409f9bab3
services.cjdns: add missing, optional login & peerName attribute 2021-05-18 17:39:04 +02:00
rnhmjoj 1a4db01c84
nixos/libreswan: update for version 4.x
- Use upstream unit files
- Remove deprecated config options
- Add option to disable redirects
- Add option to configure policies
2021-05-18 08:13:36 +02:00
Jörg Thalheim b900661f6e
Merge pull request #122825 from Izorkin/update-duplicates-systemcallfilters
treewide: remove duplicates SystemCallFilters
2021-05-17 12:06:06 +01:00
Sandro 700942d2a5
Merge pull request #121119 from SuperSandro2000/remove-gnidorah
treewide: remove gnidorah
2021-05-17 02:42:24 +02:00
Niklas Hambüchen 357cf46c8d wireguard module: Add dynamicEndpointRefreshSeconds option.
See for an intro:
https://wiki.archlinux.org/index.php/WireGuard#Endpoint_with_changing_IP
2021-05-16 20:11:51 +02:00
Yarny0 c2af1ff281 nixos/hylafax: enable ProtectKernelLogs for most services
Also document that `ProtectClock` blocks access to serial line.
I couldn't found out why this is the case,
but faxgetty complains about the device file
not being accessible with `ProtectClock=true`.
2021-05-14 22:55:50 +02:00
Robert Schütz e611d663f4
Merge pull request #120440 from dotlambda/radicale-settings
nixos/radicale: add settings option
2021-05-14 15:37:26 +02:00
Yarny0 4415846d5c nixos/hylafax: use runtimeShell where possible
According to
https://github.com/NixOS/nixpkgs/pull/84556
this effort helps with cross-compilation.

This commit also renames a substituted variable `hylafax`
to `hylafaxplus` to permit substitution with `inherit`.
2021-05-14 05:42:18 +02:00
Yarny0 89df33f882 nixos/hylafax: replace a nested expression with lib.pipe
This avoids a tripple-nested function call,
and it looks slightly simpler (at least to me).
2021-05-14 05:42:18 +02:00
Yarny0 449647daf5 nixos/hylafax: use lib.types.ints.positive
I haven't realized earlier that there is
already an option type for postive integers.
2021-05-14 05:42:17 +02:00
Izorkin feebe402f5
treewide: remove duplicates SystemCallFilters 2021-05-13 15:44:56 +03:00
Sandro f0bb4f066a
Merge pull request #95050 from paumr/bind-fmt 2021-05-10 19:06:00 +02:00
Michele Guerini Rocco d0cbcce8d4
Merge pull request #121395 from bjornfor/nixos-wpa-supplicant
nixos/wpa_supplicant: prefer 'install' over 'touch/chmod/mkdir/chgrp'
2021-05-10 08:16:39 +02:00
paumr 5390d4b946 nixos/bind: formatted with nixpkgs-fmt 2021-05-08 23:13:58 +02:00
Robert Schütz 314a64a026 nixos/znc: fix example 2021-05-08 22:54:19 +02:00
Robert Schütz 5986f233a6 nixos/znc: remove trailing slash from dataDir 2021-05-08 22:54:19 +02:00
Robert Schütz 4400ee83ec nixos/znc: harden systemd unit 2021-05-08 22:54:15 +02:00
Robert Hensing 4433ba90aa
Merge pull request #121927 from rissson/nixos-unbound-fix-top-level-include
nixos/unbound: allow list of strings in top-level settings option type
2021-05-08 22:00:57 +02:00
Marc 'risson' Schmitt 0340cd2abe
nixos/unbound: allow list of strings in top-level settings option type
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2021-05-08 19:55:17 +02:00
Aaron Andersen 9254b82706
Merge pull request #121746 from j0hax/monero-options
nixos/monero: add dataDir option
2021-05-08 11:43:49 -04:00
Gemini Lasswell 28f51d7757 nixos/yggdrasil: set directory permissions before writing keys
Remove the opportunity for someone to read the keys in between when
they are written and when the chmod is done.  Addresses #121293.
2021-05-08 09:49:19 +02:00
Johannes Arnold c0853b6e2c nixos/monero: use isSystemUser = true 2021-05-08 02:13:25 +02:00
Maximilian Bosch a50b9e6c23
Merge pull request #113716 from Ma27/wpa_multiple
wpa_supplicant: allow both imperative and declarative networks
2021-05-06 11:01:35 +02:00
Johannes Arnold ff65166f44 nixos/monero: fix typo 2021-05-04 21:57:21 +00:00
Johannes Arnold 7cf3ffbddd nixos/monero: add dataDir option 2021-05-04 21:56:45 +00:00
Robert Schütz 762be5c86d nixos/radicale: harden systemd unit 2021-05-04 17:43:26 +02:00
Michele Guerini Rocco 93c5837be5
Merge pull request #121512 from rnhmjoj/searx
searx: set settings.yml permissions using umask
2021-05-04 11:43:12 +02:00
Robert Schütz 022c5b0922 nixos/radicale: add settings option
The radicale version is no longer chosen automatically based on
system.stateVersion because that gave the impression that old versions
are still supported.
2021-05-04 10:22:05 +02:00
Andreas Rammhold 3ec6977d30
Merge pull request #89572 from rissson/nixos/unbound
nixos/unbound: add settings option, deprecate extraConfig
2021-05-03 21:49:24 +02:00
Marc 'risson' Schmitt 52f6733203
nixos/unbound: deprecate extraConfig in favor of settings
Follow RFC 42 by having a settings option that is
then converted into an unbound configuration file
instead of having an extraConfig option.

Existing options have been renamed or kept if
possible.

An enableRemoteAccess has been added. It sets remote-control setting to
true in unbound.conf which in turn enables the new wrapping of
unbound-control to access the server locally.  Also includes options
'remoteAccessInterfaces' and 'remoteAccessPort' for remote access.

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
2021-05-03 21:27:15 +02:00
Silvan Mosberger a221e6c330
Merge pull request #121172 from eyJhb/bind-list-to-attrs
nixos/bind: refactor zones from a list to attrset
2021-05-03 21:21:22 +02:00
eyjhb 757a455dde
nixos/bind: refactor zones from a list to attrset
This commit uses coercedTo to make zones a attrset instead of list.
Makes it easier to access/change zones in multiple places.
2021-05-03 20:04:42 +02:00
Silvan Mosberger 3e930b7e4a
Merge pull request #121294 from nh2/issue-121288-wireguard-fix-chmod-race
wireguard module: generatePrivateKeyFile: Fix chmod security race
2021-05-03 16:24:42 +02:00
Luke Granger-Brown 4b42da3d85
Merge pull request #120791 from mweinelt/babeld
babeld: 1.9.2 -> 1.10
2021-05-03 10:00:12 +01:00
rnhmjoj 9ea6c1979c
nixos/searx: set settings.yml permissions using umask
This should solve a leakage of secrets as suggested in #121293
2021-05-03 09:53:50 +02:00
Martin Weinelt a2d1d16af8
nixos/mosquitto: Migrate away from bind_address/port config keys
Fixes these two deprecation warnings, by moving away from these options
towards a simple listener configuration.

> The 'bind_address' option is now deprecated and will be removed in a future version. The behaviour will default to true.
> The 'port' option is now deprecated and will be removed in a future version. Please use 'listener' instead.

Fixes: #120860
2021-05-01 19:46:48 +02:00
Martin Weinelt 33e867620e
nixos/mosquitto: harden systemd unit
It can still network, it can only access the ssl related files if ssl is
enabled.

✗ PrivateNetwork=                                             Service has access to the host's network                                            0.5
✗ RestrictAddressFamilies=~AF_(INET|INET6)                    Service may allocate Internet sockets                                               0.3
✗ DeviceAllow=                                                Service has a device ACL with some special devices                                  0.1
✗ IPAddressDeny=                                              Service does not define an IP address allow list                                    0.2
✗ RootDirectory=/RootImage=                                   Service runs within the host's root directory                                       0.1
✗ RestrictAddressFamilies=~AF_UNIX                            Service may allocate local sockets                                                  0.1

→ Overall exposure level for mosquitto.service: 1.1 OK 🙂
2021-05-01 19:46:48 +02:00
Bjørn Forsman 5d47dc750f nixos/wpa_supplicant: prefer 'install' over 'touch/chmod/mkdir/chgrp'
Ref #121293.
2021-05-01 15:34:04 +02:00
Niklas Hambüchen aaffc6447d wireguard module: Quote all command line arguments correctly.
Standard best-practice shell quoting, which can prevent the most
horrible production accidents.

Note that we cannot use `+ optionalString someBool '' someString''`
because Nix's multi-line ''double-quoted'' strings remove leading
whitespace.
2021-04-30 23:05:10 +02:00
lunik1 248a57d61a
nixos/adguardhome: init (#120568) 2021-04-30 20:55:31 +02:00
Niklas Hambüchen 0dc08b4138 wireguard module: generatePrivateKeyFile: Fix chmod security race. Fixes #121288
Until now, the `touch + chmod 600 + write` approach made it possible for
an unprivileged local user read the private key file, by opening
the file after the touch, before the read permissions are restricted.

This was only the case if `generatePrivateKeyFile = true` and the parent
directory of `privateKeyFile` already existed and was readable.

This commit fixes it by using `umask`, which ensures kernel-side that
the `touch` creates the file with the correct permissions atomically.

This commit also:

* Removes `mkdir --mode 0644 -p "${dirOf values.privateKeyFile}"`
  because setting permissions `drw-r--r--` ("nobody can enter that dir")
  is awkward. `drwx------` would perhaps make sense, like for `.ssh`.
  However, setting the permissions on the private key file is enough,
  and likely better, because `privateKeyFile` is about that file
  specifically and no docs suggest that there's something special
  about its parent dir.
* Removes the `chmod 0400 "${values.privateKeyFile}"`
  because there isn't really a point in removing write access from
  the owner of the private key.
2021-04-30 18:55:38 +02:00
Sandro Jäckel ae02415ee8
treewide: remove gnidorah
due to github account removal/deletion and not other mean of contact.
2021-04-30 01:48:19 +02:00
Vladimír Čunát 5b0871bd97
Merge #120493: nixos/kresd: allow package to be configured 2021-04-29 10:41:12 +02:00
Vladimír Čunát a4749b11d4
nixos/kresd.package: improve the generated docs 2021-04-27 21:38:30 +02:00
Martin Weinelt 4e66e9aea5
nixos/babeld: start maintaining the module 2021-04-27 14:12:07 +02:00
github-actions[bot] a956f62ea4
Merge master into staging-next 2021-04-25 06:05:34 +00:00
Martin Weinelt e8988f7a30 nixos/babeld: run as DynamicUser
The last bits to prevent babeld from running unprivileged was its
kernel_setup_interface routine, that wants to set per interface
rp_filter. This behaviour has been disabled in a patch that has been
submitted upstream at https://github.com/jech/babeld/pull/68 and reuses
the skip-kernel-setup config option.

→ Overall exposure level for babeld.service: 1.7 OK 🙂
2021-04-25 00:54:52 +02:00
Sandro Jäckel 8ee00e6ca2
nixos/kresd: allow package to be configured 2021-04-24 09:18:45 +02:00
github-actions[bot] b95da5efb6
Merge master into staging-next 2021-04-22 18:14:27 +00:00
github-actions[bot] 120744d620
Merge master into staging-next 2021-04-22 12:06:24 +00:00
Jörg Thalheim 40945d399d
quagga: remove
Upstream repositories do no longer exists. There has been no release in
a while. - Not a good combination for a network daemon running as root
in C that parses network packets...
2021-04-22 12:48:48 +02:00
Michael Weiss 3e01d42024
maintainers: remove tavyc
Their last commit was dcc84d8 from 2017.
Thank you for your contributions.
2021-04-22 11:34:25 +02:00
github-actions[bot] 9b3e698b14
Merge master into staging-next 2021-04-21 12:06:23 +00:00
Oleksii Filonenko c2900f685f
Merge pull request #111518 from Jaculabilis/nebula
nixos/nebula: add basic module
2021-04-21 11:17:30 +03:00
github-actions[bot] 6ef7c23763
Merge master into staging-next 2021-04-19 18:11:51 +00:00
Lorenz Leutgeb 0b0cd3f6aa
mxisd: remove (#119372)
* mxisd: remove

See EOL notice at https://github.com/kamax-matrix/mxisd/blob/master/EOL.md#end-of-life-notice

* mxisd: Add throwing EOL notice
2021-04-19 11:26:08 -04:00
github-actions[bot] b57b2b362c
Merge master into staging-next 2021-04-18 18:10:37 +00:00
Johannes Schleifenbaum dc282fc3f3
nixos/dnsdist: dndist.conf -> dnsdist.conf 2021-04-18 13:34:28 +02:00
Morgan Jones 064e0af80b nixos/nebula: Add enable option defaulting to true to Nebula networks 2021-04-16 19:57:02 -07:00
Maximilian Bosch 84670bf681
wpa_supplicant: review fixes 2021-04-16 13:28:26 +02:00
Maximilian Bosch 08ced9d67f
nixos/wpa_supplicant: make new behavior opt-in 2021-04-16 13:18:46 +02:00
Maximilian Bosch de0a39166b
wpa_supplicant: allow both imperative and declarative networks
For a while now it's possible to specify an additional config file in
`wpa_supplicant`[1]. In contrast to the file specified via `-c` this was
supposed to be used for immutable settings and not e.g. additional
networks.

However I'm a little bit unhappy about the fact that one has to choose
between a fully imperative setup and a fully declarative one where the
one would have to write credentials for e.g. WPA2-enterprise networks
into the store.

The primary problem with the current state of `wpa_supplicant` is that
if the `SAVE_CONFIG` command is invoked (e.g. via `wpa_cli`), all known
networks will be written to `/etc/wpa_supplicant.conf` and thus all
declarative networks would get out of sync with the declarative
settings.

To work around this, I had to change the following things:

* The `networking.wireless`-module now uses `-I` for declarative config,
  so the user-controlled mode can be used along with the
  `networks`-option.

* I added an `ro`-field to the `ssid`-struct in the
  `wpa_supplicant`-sources. This will be set to `1` for each network
  specified in the config passed via `-I`.

  Whenever config is written to the disk, those networks will be
  skipped, so changes to declarative networks are only temporary.

[1] https://w1.fi/cgit/hostap/commit/wpa_supplicant?id=e6304cad47251e88d073553042f1ea7805a858d1
2021-04-16 13:18:25 +02:00