Switch pulsebert to pipewire 🎉
This commit is contained in:
parent
e44b17b4c4
commit
d5507357ec
|
@ -16,7 +16,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = !config.services.pipewire.pulse.enable;
|
||||||
systemWide = true;
|
systemWide = true;
|
||||||
tcp = {
|
tcp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -41,14 +41,38 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
# pipewire has no systemwide pipewire-pulse
|
services.pipewire = {
|
||||||
# services.pipewire = {
|
enable = true;
|
||||||
# enable = true;
|
|
||||||
# config.pipewire-pulse = lib.importJSON ./pipewire-pulse.conf.json;
|
# config.pipewire-pulse = lib.importJSON ./pipewire-pulse.conf.json;
|
||||||
# pulse.enable = true;
|
config.pipewire-pulse =
|
||||||
# socketActivation = false;
|
let
|
||||||
# systemWide = true;
|
default-pipewire-pulse = lib.importJSON (pkgs.path + "/nixos/modules/services/desktops/pipewire/daemon/pipewire-pulse.conf.json");
|
||||||
# };
|
in
|
||||||
|
default-pipewire-pulse // {
|
||||||
|
"context.exec" = default-pipewire-pulse."context.exec" ++ [
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
];
|
||||||
|
"server.address" = [
|
||||||
|
"unix:native"
|
||||||
|
"tcp:4713"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
@ -62,6 +86,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.activationScripts.enableLingering = lib.optionalString config.services.pipewire.pulse.enable (''
|
||||||
|
rm -r /var/lib/systemd/linger
|
||||||
|
mkdir /var/lib/systemd/linger
|
||||||
|
'' + lib.optionalString config.c3d2.k-ot.enable ''
|
||||||
|
touch /var/lib/systemd/linger/k-ot
|
||||||
|
'');
|
||||||
|
|
||||||
systemd.services.bluetooth-agent = lib.mkIf config.hardware.bluetooth.enable {
|
systemd.services.bluetooth-agent = lib.mkIf config.hardware.bluetooth.enable {
|
||||||
description = "Allow anyone to pair via Bluetooth";
|
description = "Allow anyone to pair via Bluetooth";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"context.modules": [
|
"context.exec": [
|
||||||
{
|
{
|
||||||
"name": "libpipewire-module-zeroconf-publish"
|
"path": "pactl",
|
||||||
},
|
"args": "load-module module-zeroconf-publish"
|
||||||
{
|
}
|
||||||
"name": "libpipewire-module-protocol-pulse",
|
],
|
||||||
"args": {
|
"pulse.properties": {
|
||||||
"auth-ip-acl": [
|
"auth-ip-acl": [
|
||||||
"127.0.0.0/8",
|
"127.0.0.0/8",
|
||||||
"::1/128",
|
"::1/128",
|
||||||
|
@ -15,18 +15,16 @@
|
||||||
"2a00:8180:2c00:200::/56",
|
"2a00:8180:2c00:200::/56",
|
||||||
"2a0f:5382:acab:1400::/56"
|
"2a0f:5382:acab:1400::/56"
|
||||||
],
|
],
|
||||||
"server.address": [
|
|
||||||
"unix:native",
|
|
||||||
"tcp:4713"
|
|
||||||
],
|
|
||||||
"pulse.min.req": "256/48000",
|
"pulse.min.req": "256/48000",
|
||||||
"pulse.default.req": "960/48000",
|
"pulse.default.req": "960/48000",
|
||||||
"pulse.min.frag": "256/48000",
|
"pulse.min.frag": "256/48000",
|
||||||
"pulse.default.frag": "96000/48000",
|
"pulse.default.frag": "96000/48000",
|
||||||
"pulse.default.tlength": "96000/48000",
|
"pulse.default.tlength": "96000/48000",
|
||||||
"pulse.min.quantum": "256/48000",
|
"pulse.min.quantum": "256/48000",
|
||||||
"pulse.default.format": "F32"
|
"pulse.default.format": "F32",
|
||||||
}
|
"server.address": [
|
||||||
}
|
"unix:native",
|
||||||
|
"tcp:4713"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{
|
{
|
||||||
|
"context.exec": [
|
||||||
|
{
|
||||||
|
"path": "pactl",
|
||||||
|
"args": "load-module module-always-sink"
|
||||||
|
}
|
||||||
|
],
|
||||||
"context.modules": [
|
"context.modules": [
|
||||||
{
|
{
|
||||||
"args": {
|
"args": {
|
||||||
|
@ -23,14 +29,16 @@
|
||||||
"name": "libpipewire-module-metadata"
|
"name": "libpipewire-module-metadata"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": {},
|
|
||||||
"name": "libpipewire-module-protocol-pulse"
|
"name": "libpipewire-module-protocol-pulse"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"context.properties": {},
|
||||||
|
"context.spa-libs": {
|
||||||
|
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||||
|
"support.*": "support/libspa-support"
|
||||||
},
|
},
|
||||||
{
|
"stream.properties": {},
|
||||||
"name": "libpipewire-module-zeroconf-publish"
|
"pulse.properties": {
|
||||||
},
|
|
||||||
{
|
|
||||||
"args": {
|
|
||||||
"auth-ip-acl": [
|
"auth-ip-acl": [
|
||||||
"127.0.0.0/8",
|
"127.0.0.0/8",
|
||||||
"::1/128",
|
"::1/128",
|
||||||
|
@ -50,26 +58,6 @@
|
||||||
"server.address": [
|
"server.address": [
|
||||||
"unix:native",
|
"unix:native",
|
||||||
"tcp:4713"
|
"tcp:4713"
|
||||||
]
|
|
||||||
},
|
|
||||||
"name": "libpipewire-module-protocol-pulse"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"context.properties": {},
|
|
||||||
"context.spa-libs": {
|
|
||||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
|
||||||
"support.*": "support/libspa-support"
|
|
||||||
},
|
|
||||||
"context.exec": [
|
|
||||||
{
|
|
||||||
"path": "pactl",
|
|
||||||
"args": "load-module module-always-sink"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stream.properties": {},
|
|
||||||
"pulse.properties": {
|
|
||||||
"server.address": [
|
|
||||||
"unix:native"
|
|
||||||
],
|
],
|
||||||
"vm.overrides": {
|
"vm.overrides": {
|
||||||
"pulse.min.quantum": "1024/48000"
|
"pulse.min.quantum": "1024/48000"
|
||||||
|
|
|
@ -597,10 +597,14 @@
|
||||||
# build: outputs.nixosConfigurations.pulsebert.config.system.build.sdImage
|
# build: outputs.nixosConfigurations.pulsebert.config.system.build.sdImage
|
||||||
# run: unzstd -cd result/sd-image/nixos-sd-image-*-aarch64-linux.img.zst | pv -br | sudo dd bs=4M of=/dev/sdX
|
# run: unzstd -cd result/sd-image/nixos-sd-image-*-aarch64-linux.img.zst | pv -br | sudo dd bs=4M of=/dev/sdX
|
||||||
"${inputs.nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel.nix"
|
"${inputs.nixos-unstable}/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel.nix"
|
||||||
|
{
|
||||||
|
nixpkgs = {
|
||||||
|
hostPlatform = "aarch64-linux";
|
||||||
|
# buildPlatform = "x86_64-linux";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
nixpkgs = inputs.nixos-unstable;
|
nixpkgs = inputs.nixos-unstable;
|
||||||
# system = "x86_64-linux";
|
|
||||||
system = "aarch64-linux";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
radiobert = nixosSystem' {
|
radiobert = nixosSystem' {
|
||||||
|
|
|
@ -34,8 +34,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
buildCores = 2;
|
settings = {
|
||||||
maxJobs = 1;
|
cores = 2;
|
||||||
|
max-jobs = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
|
Loading…
Reference in New Issue