Compare commits
1 commit
af7fc33d66
...
d854b93393
Author | SHA1 | Date | |
---|---|---|---|
d854b93393 |
5 changed files with 21 additions and 4 deletions
|
@ -37,7 +37,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
audio-hauptraum-kueche = nixpkgs.lib.nixosSystem {
|
audio-hauptraum-kueche = nixpkgs-unstable.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./config/common
|
./config/common
|
||||||
|
|
|
@ -12,6 +12,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./librespot.nix
|
./librespot.nix
|
||||||
./mpd.nix
|
./mpd.nix
|
||||||
|
./networking.nix
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
./shairport-sync.nix
|
./shairport-sync.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
After = [ "network-online.target" "pipewire.service" ];
|
After = [ "network-online.target" "pipewire.service" ];
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
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";
|
User = "librespot";
|
||||||
Group = "librespot";
|
Group = "librespot";
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ in
|
||||||
users.librespot = {
|
users.librespot = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "librespot";
|
group = "librespot";
|
||||||
extraGroups = [ "pipewire" "audio" ];
|
extraGroups = [ "pipewire" ];
|
||||||
};
|
};
|
||||||
groups.librespot = { };
|
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";
|
arguments = "-o pw -v";
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.shairport.extraGroups = [ "pipewire" "audio" ];
|
users.users.shairport.extraGroups = [ "pipewire" ];
|
||||||
|
|
||||||
environment.etc.shairport-sync-config = {
|
environment.etc.shairport-sync-config = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue