Commit Graph

15 Commits

Author SHA1 Message Date
Felix Buehler
327b0cff7a treewide: use more lib.optionalString 2023-04-07 13:38:33 +02:00
Solene Rapenne
535c434fa8 nixos/snapserver: openFirewall default to false 2022-12-05 12:03:02 +01:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Tobias Mayer
0d49836dec
nixos/snapserver: don't open ports by default 2022-04-20 23:25:28 +02:00
Dustin Frisch
ec10d9a836
nixos/snapserver: fix argument handling.
The argument parser used by snapserver behaves differntly for optional
arguments with existing defaults. In such cases, the standalone argument
name is a valid input and a following value is interpreted as a
positional argument. Therefore the argument and the value must be
provided as a single argument seperated by equals sign.
2022-02-24 23:11:58 +01:00
Andreas Rammhold
c9c93b0add
nixos/snapserver: use the correct bind address arguments
Snapserver expects the arguments `--tcp.bind_to_address` and
`--http.bind_to_address` instead of the `--tcp.address` (and http
equivalent) versions.

This caused the process to listen on `0.0.0.0` (for TCP and HTTP
sockets) regardless of the configuration value. It also never listend on
the IPv6 address `::` as our module system made the user believe.

This commit fixes the above issue and ensures that (at least for the TCP
socket) that our default `::` does indeed allow connections via IPv6
(to localhost aka ::1).
2021-12-16 23:27:56 +01:00
Naïm Favier
2ddc335e6f
nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
Alexandre Macabies
f5b0542cb1 nixos/snapserver: add support for meta stream type introduced in 0.23.0 2021-03-25 04:05:50 +01:00
Sandro
a64370c164
Merge pull request #112295 from thelegy/snapserver-fix-buffer-options
nixos/snapserver: Fix buffer options not coercible to str
2021-02-07 17:10:34 +01:00
Jan Beinke
58d49db69d nixos/snapserver: Fix buffer options not coercible to str 2021-02-07 12:53:27 +01:00
Alexandre Macabies
255882fbcc nixos/snapserver: add AF_NETLINK to allowed address families
This is necessary for Librespot, which is spawned by snapserver in the
same cgroup. Librespot requires querying local ip links and addresses
for MDNS (Zeroconf/Avahi), and does so through NETLINK interface.
2021-02-05 19:23:25 +01:00
Alexandre Macabies
a36cc03d96 nixos/snapserver: update available stream types for v0.21.0
* Add 'librespot' (new name for 'spotify'), 'alsa', 'tcp'.
* Add a warning about the spotify -> librespot rename.
* Fix the deprecated example `mode = "listen"` for type 'pipe'.
* Update the tests to include a straightforward 'tcp' test.
2021-02-05 19:23:24 +01:00
Martin Weinelt
cc4f533a9a
nixos/snapserver: update module to work with snapcast 0.20 2020-08-02 16:58:07 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Tobias Mayer
085751b63b nixos/snapserver: init
A nixos module for configuring the server side of pkgs.snapcast.
The module is named "snapserver" following upstream convention.
This commit does not provide module for the corresponding client.

Fix handling of port and controlPort

Fix stream uri generation & address review

Remove unused streams options & add description

Add missing description & Remove default fs path

Use types.port for ports & formatting improvements

Force mpd and mopidy to wait for snapserver
2019-03-06 23:40:05 +01:00