Skip to content

services.snapserver.buffer

Network buffer in ms.

Type: null or signed integer

Default

null

Example

1000

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.codec

Default audio compression method.

Type: null or string

Default

null

Example

"flac"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.enable

Whether to enable snapserver.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.http.docRoot

Path to serve from the HTTP servers root.

Type: null or path

Default

null

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.http.enable

Whether to enable the JSON-RPC via HTTP.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.http.listenAddress

The address where the HTTP JSON-RPC listens on.

Type: string

Default

"::"

Example

"0.0.0.0"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.http.port

The port where the HTTP JSON-RPC listens on.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

1780

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.listenAddress

The address where snapclients can connect.

Type: string

Default

"::"

Example

"0.0.0.0"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.openFirewall

Whether to automatically open the specified ports in the firewall.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.port

The port that snapclients can connect to.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

1704

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.sampleFormat

Default sample format.

Type: null or string

Default

null

Example

"48000:16:2"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.sendToMuted

Send audio to muted clients.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streamBuffer

Stream read (input) buffer in ms.

Type: null or signed integer

Default

null

Example

20

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams

The definition for an input source.

Type: attribute set of (submodule)

Default

{default = { };}

Example

{mpd = {type = "pipe";location = "/run/snapserver/mpd";sampleFormat = "48000:16:2";codec = "pcm";};};

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams.<name>.codec

Default audio compression method.

Type: null or string

Default

null

Example

"flac"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams.<name>.location

For type pipe or file, the path to the pipe or file. For type librespot, airplay or process, the path to the corresponding binary. For type tcp, the host:port address to connect to or listen on. For type meta, a list of stream names in the form /one/two/.... Don't forget the leading slash. For type alsa, use an empty string.

Type: path or string

Example

"/path/to/pipe""/path/to/librespot""192.168.1.2:4444""/MyTCP/Spotify/MyPipe"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams.<name>.query

Key-value pairs that convey additional parameters about a stream.

Type: attribute set of string

Default

{ }

Example

`#!nix # for type == "pipe": { mode = "create"; };

for type == "process":

{ params = "--param1 --param2"; logStderr = "true"; };

for type == "tcp":

{ mode = "client"; }

for type == "alsa":

{ device = "hw:0,0"; } `

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams.<name>.sampleFormat

Default sample format.

Type: null or string

Default

null

Example

"48000:16:2"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.streams.<name>.type

The type of input stream.

Type: one of "pipe", "librespot", "airplay", "file", "process", "tcp", "alsa", "spotify", "meta"

Default

"pipe"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.tcp.enable

Whether to enable the JSON-RPC via TCP.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.tcp.listenAddress

The address where the TCP JSON-RPC listens on.

Type: string

Default

"::"

Example

"0.0.0.0"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix

services.snapserver.tcp.port

The port where the TCP JSON-RPC listens on.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

1705

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/audio/snapserver.nix