mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Desktop/Multimedia+Pipewire] automatically add Apple AirPlay audio sinks
This commit is contained in:
parent
6037992607
commit
2777953146
3 changed files with 69 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ in {
|
|||
default = true;
|
||||
example = false;
|
||||
};
|
||||
airplay.enable = (mkEnableOption "AirPlay sink device support") // { default = true; };
|
||||
};
|
||||
graphics = {
|
||||
shaderCache = {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ let
|
|||
noiseFilterStrength = cfg.audio.noise-filter.strength;
|
||||
};
|
||||
|
||||
airplayConfig = pkgs.callPackage ./pipewire/pipewire-airplay.conf.nix {};
|
||||
|
||||
# Multimedia Packages
|
||||
|
||||
myFFmpeg = let
|
||||
|
|
@ -112,6 +114,9 @@ in {
|
|||
enable = cfg.audio.noise-filter.strength > 0.0;
|
||||
}
|
||||
);
|
||||
pipewire-airplay-sink = mkIf cfg.audio.airplay.enable (
|
||||
mkPipewireModule { conf = airplayConfig; description = "Pipewire Airplay Sink"; }
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
63
desktop/pipewire/pipewire-airplay.conf.nix
Normal file
63
desktop/pipewire/pipewire-airplay.conf.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ lib
|
||||
, writeText
|
||||
}:
|
||||
|
||||
writeText "pipewire-airplay.conf" ''
|
||||
# Noise canceling source
|
||||
#
|
||||
# start with pipewire -c filter-chain/source-rnnoise.conf
|
||||
#
|
||||
context.properties = {
|
||||
log.level = 3
|
||||
}
|
||||
|
||||
#context.spa-libs = {
|
||||
# audio.convert.* = audioconvert/libspa-audioconvert
|
||||
# support.* = support/libspa-support
|
||||
#}
|
||||
|
||||
context.modules = [
|
||||
{ name = libpipewire-module-rtkit
|
||||
args = {
|
||||
nice.level = -11
|
||||
}
|
||||
flags = [ ifexists nofail ]
|
||||
}
|
||||
{ name = libpipewire-module-protocol-native }
|
||||
{ name = libpipewire-module-client-node }
|
||||
{ name = libpipewire-module-adapter }
|
||||
|
||||
{ name = libpipewire-raop-discover
|
||||
args = {
|
||||
#raop.latency.ms = 1000
|
||||
stream.rules = [
|
||||
{ matches = [
|
||||
{ raop.ip = "~.*"
|
||||
#raop.port = 1000
|
||||
#raop.name = ""
|
||||
#raop.hostname = ""
|
||||
#raop.domain = ""
|
||||
#raop.device = ""
|
||||
#raop.transport = "udp" | "tcp"
|
||||
#raop.encryption.type = "RSA" | "auth_setup" | "none"
|
||||
#raop.audio.codec = "PCM" | "ALAC" | "AAC" | "AAC-ELD"
|
||||
#audio.channels = 2
|
||||
#audio.format = "S16" | "S24" | "S32"
|
||||
#audio.rate = 44100
|
||||
#device.model = ""
|
||||
}
|
||||
]
|
||||
actions = {
|
||||
create-stream = {
|
||||
#raop.password = ""
|
||||
stream.props = {
|
||||
#target.object = ""
|
||||
media.class = "Audio/Sink"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
] # stream.rules
|
||||
} # args
|
||||
}
|
||||
}]''
|
||||
Loading…
Add table
Add a link
Reference in a new issue