Compare commits
1 commit
af7fc33d66
...
d854b93393
Author | SHA1 | Date | |
---|---|---|---|
d854b93393 |
5 changed files with 21 additions and 4 deletions
|
@ -37,7 +37,7 @@
|
|||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
audio-hauptraum-kueche = nixpkgs.lib.nixosSystem {
|
||||
audio-hauptraum-kueche = nixpkgs-unstable.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./config/common
|
||||
|
|
|
@ -12,6 +12,7 @@ in
|
|||
imports = [
|
||||
./librespot.nix
|
||||
./mpd.nix
|
||||
./networking.nix
|
||||
./pipewire.nix
|
||||
./shairport-sync.nix
|
||||
];
|
||||
|
|
|
@ -23,7 +23,7 @@ in
|
|||
After = [ "network-online.target" "pipewire.service" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache";
|
||||
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache --quiet";
|
||||
User = "librespot";
|
||||
Group = "librespot";
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ in
|
|||
users.librespot = {
|
||||
isSystemUser = true;
|
||||
group = "librespot";
|
||||
extraGroups = [ "pipewire" "audio" ];
|
||||
extraGroups = [ "pipewire" ];
|
||||
};
|
||||
groups.librespot = { };
|
||||
};
|
||||
|
|
16
modules/services/audio/networking.nix
Normal file
16
modules/services/audio/networking.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.ccchh.services.audio;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
# Disable IPv6, since Shairport-Sync doesn't work with IPv6. Unclear why.
|
||||
networking.enableIPv6 = false;
|
||||
};
|
||||
}
|
|
@ -20,7 +20,7 @@ in
|
|||
arguments = "-o pw -v";
|
||||
};
|
||||
|
||||
users.users.shairport.extraGroups = [ "pipewire" "audio" ];
|
||||
users.users.shairport.extraGroups = [ "pipewire" ];
|
||||
|
||||
environment.etc.shairport-sync-config = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue