audio-server: drop 22.11/23.05 compat code
This commit is contained in:
parent
8d23d4cf67
commit
8e18277b8d
|
@ -238,16 +238,13 @@
|
|||
inherit system;
|
||||
|
||||
modules = [
|
||||
({ pkgs, ... }: {
|
||||
{
|
||||
_module.args = {
|
||||
inherit hostRegistry libC nixos ssh-public-keys zentralwerk;
|
||||
|
||||
# TODO: drop!
|
||||
is2305 = (lib.versions.majorMinor pkgs.lib.version) == "23.05";
|
||||
};
|
||||
|
||||
nixpkgs.overlays = overlayList;
|
||||
})
|
||||
}
|
||||
|
||||
self.nixosModules.c3d2
|
||||
] ++ modules;
|
||||
|
|
|
@ -1,47 +1,6 @@
|
|||
{ config, is2305, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# _____ _______ ____ _____
|
||||
# / ____|__ __/ __ \| __ \
|
||||
# | (___ | | | | | | |__) |
|
||||
# \___ \ | | | | | | ___/
|
||||
# ____) | | | | |__| | |
|
||||
# |_____/ |_| \____/|_|
|
||||
#
|
||||
# errors such as:
|
||||
# mod.zeroconf-publish: error id:47 seq:349 res:-2 (No such file or directory): enum params id:16 (Spa:Enum:ParamId:ProcessLatency) failed
|
||||
# are harmless and can be ignored. You most likely want to restart your local avahi-daemon: sudo systemctl restart avahi-daemon
|
||||
pipewireCfg = contextExec: let
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
in {
|
||||
"context.exec" = contextExec ++ [
|
||||
# should be loaded by "server.address" but that is either to late or razy on 23.05
|
||||
{
|
||||
"path" = pactl;
|
||||
"args" = "load-module module-native-protocol-tcp";
|
||||
} {
|
||||
"path" = pactl;
|
||||
"args" = "load-module module-zeroconf-publish";
|
||||
}
|
||||
];
|
||||
"pulse.properties" = {
|
||||
"auth-ip-acl" = [
|
||||
"127.0.0.0/8"
|
||||
"::1/128"
|
||||
"fd23:42:c3d2:500::/56"
|
||||
"172.22.99.0/24"
|
||||
"172.20.72.0/21"
|
||||
"2a00:8180:2c00:200::/56"
|
||||
"2a0f:5382:acab:1400::/56"
|
||||
];
|
||||
"pulse.default.tlength" = "96000/48000";
|
||||
"server.address" = [
|
||||
"unix:native"
|
||||
"tcp:4713"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
cfg = config.c3d2.audioServer;
|
||||
in
|
||||
{
|
||||
|
@ -55,8 +14,45 @@ in
|
|||
boot.kernelPackages = lib.mkOverride 900 pkgs.linuxPackages-rt_latest;
|
||||
|
||||
environment = {
|
||||
etc = lib.optionalAttrs is2305 {
|
||||
"pipewire/pipewire.conf.d/audio-server.conf".text = builtins.toJSON (pipewireCfg [ ]);
|
||||
etc."pipewire/pipewire.conf.d/audio-server.conf".text = let
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
# _____ _______ ____ _____
|
||||
# / ____|__ __/ __ \| __ \
|
||||
# | (___ | | | | | | |__) |
|
||||
# \___ \ | | | | | | ___/
|
||||
# ____) | | | | |__| | |
|
||||
# |_____/ |_| \____/|_|
|
||||
#
|
||||
# errors such as:
|
||||
# mod.zeroconf-publish: error id:47 seq:349 res:-2 (No such file or directory): enum params id:16 (Spa:Enum:ParamId:ProcessLatency) failed
|
||||
# are harmless and can be ignored. You most likely want to restart your local avahi-daemon: sudo systemctl restart avahi-daemon
|
||||
in builtins.toJSON {
|
||||
"context.exec" = [
|
||||
# should be loaded by "server.address" but that is either to late or razy on 23.05
|
||||
{
|
||||
"path" = pactl;
|
||||
"args" = "load-module module-native-protocol-tcp";
|
||||
} {
|
||||
"path" = pactl;
|
||||
"args" = "load-module module-zeroconf-publish";
|
||||
}
|
||||
];
|
||||
"pulse.properties" = {
|
||||
"auth-ip-acl" = [
|
||||
"127.0.0.0/8"
|
||||
"::1/128"
|
||||
"fd23:42:c3d2:500::/56"
|
||||
"172.22.99.0/24"
|
||||
"172.20.72.0/21"
|
||||
"2a00:8180:2c00:200::/56"
|
||||
"2a0f:5382:acab:1400::/56"
|
||||
];
|
||||
"pulse.default.tlength" = "96000/48000";
|
||||
"server.address" = [
|
||||
"unix:native"
|
||||
"tcp:4713"
|
||||
];
|
||||
};
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
mpd
|
||||
|
@ -160,13 +156,6 @@ in
|
|||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = lib.mkIf cfg.ledfx true; # required for ledfx
|
||||
config = lib.mkIf (!is2305) {
|
||||
pipewire-pulse =
|
||||
let
|
||||
default-pipewire-pulse = lib.importJSON (pkgs.path + "/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json");
|
||||
in
|
||||
default-pipewire-pulse // (pipewireCfg default-pipewire-pulse."context.exec");
|
||||
};
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue