Commit graph

20931 commits

Author SHA1 Message Date
sternenseemann d51edbe17e nixos/spacecookie: reflect changes for spacecookie 1.0.0.0
* New log options
* The old port option has been deprecated in favor of listen -> port

https://github.com/sternenseemann/spacecookie/blob/master/CHANGELOG.md#1000
2021-04-10 15:44:19 +02:00
sternenseemann 76583ee81a nixos/spacecookie: convert into settings-style freeform configuration
* Move `hostname` and `root` into a settings submodule with a freeform
  type, allowing users to also use options not known to the NixOS
  service. Compatibility with a warning for the renamed options is also
  trivial to achieve.
* `port` stays where it is as we don't actually use the `port` option of
  spacecookie to set up the socket, but only to inform spacecookie about
  the port we have set in the `systemd.socket` file, this makes more
  sense. Additionally the configuration of the listening port and
  address change in the next spacecookie release — we can dodge this
  issue altogether by doing our own thing, but I'm interested to hear
  opinions on this.
  To ensure that this is not misconfigured, we add an assertion for
  the port option.
* Add an assertion for `user` in settings which has no effect the way
  we are starting spacecookie as it wouldn't be able to call setuid.
  The message also explains how a specific user can be used with
  spacecookie if desired.
2021-04-10 15:44:19 +02:00
sternenseemann b74821f31b nixos/spacecookie: add address option customizing listen address
This configuration option reflects a new feature from the unreleased
spacecookie version allowing to customize the address spacecookie will
listen on (e. g. "::1" to bind on link-local addresses only). We will
not use this feature in the future, since the configuration option of
spacecookie naturally only has an effect if we don't use socket
activation (and spacecookie sets up its own socket), but having the same
functionality in the service seems like a good idea.

We can luckily emulate this behavior with socket activation as well.
2021-04-10 15:44:19 +02:00
sternenseemann d1f57cbaf0 nixos/spacecookie: add openFirewall option
Convenience shortcut which automatically configures the firewall to open
the port which is also configured for the spacecookie service.
2021-04-10 15:44:19 +02:00
sternenseemann 58be28d7ce nixos/spacecookie: add package option
This allows to change the derivation to use for the spacecookie server
binary. We probably should also use justStaticExecutables by default to
reduce the runtime closure of the service.
2021-04-10 15:44:19 +02:00
sternenseemann 8abd77c811 nixos/tests/spacecookie: refactor
* Use proper gopher urls
* The client vms name is also controlled in a single place now
* fileContent holds the precise file content now
* wait for the spacecookie unit instead of the port
  * avoids sending an empty request
  * since spacecookie is a notify service it only is fully started when
    the socket has been set up.
2021-04-10 15:44:19 +02:00
sternenseemann 6b577f46b4 nixos/spacecookie: use nix style strings for description 2021-04-10 15:44:19 +02:00
Vincent Haupert f4af2f267a
nixos/github-runner: init at v2.277.1 (#116775)
* github-runner: init at 2.277.1

* nixos/github-runner: initial version

* nixos/github-runner: add warning if tokenFile in Nix store

* github-runner: don't accept unexpected attrs

* github-runner: formatting nits

* github-runner: add pre and post hooks to checkPhase

* nixos/github-runner: update ExecStartPre= comment

* nixos/github-runner: adapt tokenFile option description

Also note that not only a change to the option value will trigger a
reconfiguration but also modifications to the file's content.

* nixos/github-runner: remove mkDefault for DynamicUser=

* nixos/github-runner: create a parent for systemd dirs

Adds a parent directory "github-runner/" to all of the systemd lifecycle
directories StateDirectory=, RuntimeDirectory= and LogDirectory=.

Doing this has two motivations:

1. Something like this would required if we want to support multiple
   runners configurations. Please note that this is already possible
   using NixOS containers.
2. Having an additional parent directory makes it easier to remap
   any of the directories. Without a parent, systemd is going to
   complain if, for example, the given StateDirectory= is a symlink.

* nixos/github-runner: use specifier to get abs runtime path

* nixos/github-runner: use hostname as default for option `name`

Until now, the runner registration did not set the `--name` argument if
the configuration option was `null`, the default for the option.
According to GitHub's documentation, this instructs the registration
script to use the machine's hostname.

This commit causes the registration to always pass the `--name` argument
to the runner configuration script. The option now defaults to
`networking.hostName` which should be always set on NixOS.

This change becomes necessary as the systemd service name includes the
name of the runner since fcfa809 and, hence, expects it to be set. Thus,
an unset `name` option leads to an error.

* nixos/github-runner: use types.str for `name` option

Forcing a `name` option to comply with a pattern which could also be
used as a hostname is probably not required by GitHub.

* nixos/github-runner: pass dir paths explicitly for ExecStartPre=

* nixos/github-runner: update variable and script naming

* nixos/github-runner: let systemd choose the user/group

User and group naming restrictions are a complex topic [1] that I don't
even want to touch. Let systemd figure out the username and group and
reference it in our scripts through the USER environment variable.

[1] https://systemd.io/USER_NAMES/

* Revert "nixos/github-runner: use types.str for `name` option"

The escaping applied to the subdirectory paths given to StateDirectory=,
RuntimeDirectory= and LogsDirectory= apparently doesn't use the same
strategy that is used to escape unit names (cf. systemd-escape(1)). This
makes it unreasonably hard to construct reliable paths which work for
StateDirectory=/RuntimeDirectory=/LogsDirectory= and ExecStartPre=.

Against this background, I decided to (re-)apply restrictions to the
name a user might give for the GitHub runner. The pattern for
`networking.hostName` seems like a reasonable choice, also as its value
is the default if the `name` option isn't set.

This reverts commit 193ac67ba337990c22126da24a775c497dbc7e7d.

* nixos/github-runner: use types.path for `tokenFile` option

* nixos/github-runner: escape options used as shell arguments

* nixos/github-runner: wait for network-online.target

* github-runner: ignore additional online tests
2021-04-10 10:17:10 +00:00
Jörg Thalheim f7e08360b0
Merge pull request #117456 from Izorkin/update-redis-options
nixos/redis: add option and change access to directories
2021-04-10 06:06:19 +01:00
Frederik Rietdijk 0656d546fb
Merge pull request #118312 from NixOS/staging-next
Staging next
2021-04-09 18:29:47 +02:00
Maximilian Bosch 842f900e73
Merge pull request #114128 from jorsn/docs.fix-hostName
nixos/docs: fix example for code-generated modules
2021-04-09 18:05:51 +02:00
Martin Weinelt f882b057be
Merge pull request #111316 from higebu/add-gobgpd 2021-04-09 17:17:07 +02:00
Yuya Kusakabe 8b11f5b705
nixos/tests/gobgpd: init 2021-04-09 14:57:33 +00:00
Yuya Kusakabe 45cffe7985
nixos/gobpgd: init 2021-04-09 14:57:11 +00:00
github-actions[bot] c876eb99be
Merge master into staging-next 2021-04-09 12:06:22 +00:00
Martin Weinelt 75047877e3
nixos/tests/home-assistant: fix mosquitto configuration
Things broke after mosquitto was upgraded in f07c81b.
2021-04-09 13:51:24 +02:00
Jörg Thalheim 9af991a1b1
Merge pull request #117618 from Mic92/docker
nixos/docker: re-add network.target
2021-04-09 12:43:13 +01:00
github-actions[bot] c99b6f5343
Merge master into staging-next 2021-04-09 00:16:01 +00:00
Luke Granger-Brown 1ce6b05ea1 nixos/libvirtd: add package option
At the moment, it's not possible to override the libvirtd package used
without supplying a nixpkgs overlay. Adding a package option makes
libvirtd more consistent and allows enabling e.g. ceph and iSCSI support
more easily.
2021-04-09 01:20:19 +02:00
Sandro 26f16c1cef
Merge pull request #91318 from stephank/pkg-doh-proxy-rust 2021-04-08 22:32:12 +02:00
Bernardo Meurer e630784ffa
Merge pull request #118409 from cpcloud/fix-nvidia-podman
virtualisation/containers: move to settings model for containersConf
2021-04-08 19:48:05 +00:00
github-actions[bot] 85b57e4446
Merge master into staging-next 2021-04-08 18:14:17 +00:00
Robert Schütz 5522a67fa5
Merge pull request #118719 from dotlambda/home-assistant-tests
nixos/home-assistant: use override before overridePythonAttrs
2021-04-08 18:19:34 +02:00
Tim Steinbach d3d40b09fd kernel: Add test for RC kernels 2021-04-08 09:00:15 -04:00
Tim Steinbach 491f0a677b kernel: Add test for 4.4 2021-04-08 09:00:15 -04:00
Tim Steinbach 00c364a929 kernel: Add test for 4.9 2021-04-08 09:00:15 -04:00
Tim Steinbach 8c82c8a11c kernel: Add test for 4.14 2021-04-08 09:00:15 -04:00
Tim Steinbach 621a979bfe kernel: Add test for 4.19 2021-04-08 09:00:15 -04:00
Tim Steinbach 060e94136f kernel: Add test for 5.4 2021-04-08 09:00:15 -04:00
Tim Steinbach 1dc38fbbc2 kernel: Add test for 5.10 2021-04-08 09:00:15 -04:00
Tim Steinbach 13c3f30d11 kernel: Remove old kernel tests 2021-04-08 09:00:15 -04:00
Tim Steinbach bd7fed9a2f kernel: Add tests to passthru.tests 2021-04-08 09:00:15 -04:00
Sandro 936f450e3d
Merge pull request #118805 from helsinki-systems/fix/eval/no-aliases-iproute2
treewide: fix eval without aliases after 9378fdf87e0626e8c63a90a378c3…
2021-04-08 14:20:12 +02:00
Kim Lindberger 5a1bd5ff66
Merge pull request #116074 from talyz/discourse
discourse: Add package and NixOS module
2021-04-08 14:19:49 +02:00
ajs124 c6d4dae35d treewide: fix eval without aliases after 9378fdf87e 2021-04-08 13:33:09 +02:00
Robert Schütz 5e0defcb25 nixos/home-assistant: use override before overridePythonAttrs 2021-04-08 12:30:59 +02:00
github-actions[bot] 8d1d992273
Merge master into staging-next 2021-04-08 00:17:24 +00:00
Martin Weinelt c11a3f5fd4
Merge pull request #118633 from mweinelt/home-assistant-team 2021-04-08 01:55:27 +02:00
Bernardo Meurer 890b13b38c
Merge pull request #118701 from jansol/pipewire
pipewire: 0.3.24 -> 0.3.25
2021-04-07 21:35:29 +00:00
Sandro 318115515b
Merge pull request #118742 from FRidh/tailscale
services.tailscale: add openresolv to path
2021-04-07 23:31:10 +02:00
Phillip Cloud 7c36ce8d3a nixos/containers: move extraConfig to settings model 2021-04-07 16:08:18 -04:00
Vladimír Čunát b132849dae
Merge #117519: nixos/amdgpu: remove 2021-04-07 20:25:55 +02:00
github-actions[bot] 6e4d572602
Merge master into staging-next 2021-04-07 18:14:53 +00:00
Frederik Rietdijk b9ef51a84b services.tailscale: add openresolv to path
Without openresolv, magic dns is not very usable.
2021-04-07 18:40:04 +02:00
Jan Solanti f94c84f844 pipewire: 0.3.24 -> 0.3.25 2021-04-07 16:23:43 +03:00
Robert Hensing 58b21dea78
Merge pull request #116749 from vroad/docker-layered-image-fakeroot
dockerTools.streamLayeredImage: add fakeRootCommands option
2021-04-07 15:02:24 +02:00
Stéphan Kochen 20481bd027 doh-proxy-rust: init at 0.3.8 2021-04-07 14:23:55 +02:00
Emery Hemingway 32a5b44b8d nixos/samba: remove bad example for "securityType" option
Setting "security = share" causes silent failures.
2021-04-07 14:18:01 +02:00
github-actions[bot] 1d48804dab
Merge master into staging-next 2021-04-07 12:06:23 +00:00
vroad 63e7c4186f dockerTools.streamLayeredImage: Add test for fakeRootCommands 2021-04-07 18:11:02 +09:00