forked from poz/niksos
cleaned up pipewire config
This commit is contained in:
parent
ec2573e7e7
commit
639fa4e14f
2 changed files with 48 additions and 35 deletions
|
@ -128,50 +128,16 @@ in
|
|||
CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
||||
GTK2_RC_FILES = "\${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
|
||||
};
|
||||
etc = let
|
||||
json = pkgs.formats.json {};
|
||||
in {
|
||||
etc = {
|
||||
"greetd/environments".text = ''
|
||||
Hyprland
|
||||
zsh
|
||||
shutdown now
|
||||
'';
|
||||
"pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
|
||||
context.properties = {
|
||||
default.clock.rate = 48000
|
||||
default.clock.quantum = 256
|
||||
default.clock.min-quantum = 256
|
||||
default.clock.max-quantum = 256
|
||||
}
|
||||
'';
|
||||
"pipewire/pipewire-pulse.d/92-low-latency.conf".source = json.generate "92-low-latency.conf" {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
pulse.min.req = "256/48000";
|
||||
pulse.default.req = "256/48000";
|
||||
pulse.max.req = "256/48000";
|
||||
pulse.min.quantum = "256/48000";
|
||||
pulse.max.quantum = "256/48000";
|
||||
};
|
||||
}
|
||||
];
|
||||
stream.properties = {
|
||||
node.latency = "256/48000";
|
||||
resample.quality = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
47
hosts/niks/pipewire.nix
Normal file
47
hosts/niks/pipewire.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
etc = let
|
||||
json = pkgs.formats.json {};
|
||||
rate = 48000;
|
||||
quantum = 256;
|
||||
in {
|
||||
"pipewire/pipewire.conf.d/92-low-latency.conf".text = ''
|
||||
context.properties = {
|
||||
default.clock.rate = ${rate}
|
||||
default.clock.quantum = ${quantum}
|
||||
default.clock.min-quantum = ${quantum}
|
||||
default.clock.max-quantum = ${quantum}
|
||||
}
|
||||
'';
|
||||
"pipewire/pipewire-pulse.d/92-low-latency.conf".source = json.generate "92-low-latency.conf" {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
pulse.min.req = "${quantum}/${rate}";
|
||||
pulse.default.req = "${quantum}/${rate}";
|
||||
pulse.max.req = "${quantum}/${rate}";
|
||||
pulse.min.quantum = "${quantum}/${rate}";
|
||||
pulse.max.quantum = "${quantum}/${rate}";
|
||||
};
|
||||
}
|
||||
];
|
||||
stream.properties = {
|
||||
node.latency = "${quantum}/${rate}";
|
||||
resample.quality = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue