many changes

This commit is contained in:
2024-02-16 22:24:54 +01:00
parent b4bf0ee486
commit 5ebcd0818b
22 changed files with 532 additions and 338 deletions

View File

@@ -3,30 +3,39 @@
lib,
pkgs,
...
}: {
}:
let
hostName = "music-bed";
outputDevice = "snd_rpi_hifiberry_dacplus";
snapserverHost = "snapcast.cloonar.com";
in
{
nixpkgs.crossSystem.system = "aarch64-linux";
imports = [
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
];
networking.hostName = "music-piano";
networking.hostName = hostName;
networking.wireless = {
enable = true;
networks = {
"Cloonar-Smart" = {
"Cloonar-Multimedia" = {
hidden = true;
psk = "0m6sY7Ue3G31";
psk = "";
};
};
};
boot = {
loader.raspberryPi.firmwareConfig = ''
dtparam=audio=on
'';
extraModprobeConfig = ''
options snd_bcm2835 enable_headphones=1
dtoverlay=vc4-kms-v3d,noaudio
dtoverlay=hifiberry-dacplus
force_eeprom_read=0
dtdebug=1
'';
# extraModprobeConfig = ''
# options snd_bcm2835 enable_headphones=1
# '';
};
# hardware.raspberry-pi."4" = {
@@ -45,7 +54,7 @@
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.snapcast}/bin/snapclient --daemon --hostID ${config.networking.hostName} -h fw.cloonar.com --player alsa -s Headphones";
ExecStart = "${pkgs.snapcast}/bin/snapclient --daemon --hostID ${config.networking.hostName} -h ${snapserverHost} --player alsa -s ${outputDevice}";
PIDFile = "/run/snapclient/pid";
Restart = "on-failure";
RestartSec = "5s";