Compare commits
2 commits
d1e7ab17e2
...
c75979acef
Author | SHA1 | Date | |
---|---|---|---|
Antoine Martin | c75979acef | ||
Antoine Martin | 4d091d5aa6 |
|
@ -74,6 +74,8 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
pipewire.enable = true;
|
||||
|
||||
wireguard = {
|
||||
enable = false;
|
||||
iface = "wg";
|
||||
|
@ -112,13 +114,6 @@ in
|
|||
# TODO: remove when https://nixpk.gs/pr-tracker.html?pr=124237 reaches unstable
|
||||
nix.sandboxPaths = [ "/bin/sh=${pkgs.bash}/bin/sh" ];
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
./monitoring.nix
|
||||
./nextcloud.nix
|
||||
./nginx.nix
|
||||
./pipewire.nix
|
||||
./postgresql-backup.nix
|
||||
./postgresql.nix
|
||||
./tgv.nix
|
||||
|
|
68
services/pipewire.nix
Normal file
68
services/pipewire.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.my.services.pipewire;
|
||||
my = config.my;
|
||||
in
|
||||
{
|
||||
options.my.services.pipewire = {
|
||||
enable = lib.mkEnableOption "Pipewire sound backend";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# from NixOS wiki, causes conflicts with pipewire
|
||||
sound.enable = false;
|
||||
# recommended for pipewire as well
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
|
||||
media-session = {
|
||||
enable = true;
|
||||
config.bluez-monitor.rules = [
|
||||
{
|
||||
# Matches all cards
|
||||
matches = [{ "device.name" = "~bluez_card.*"; }];
|
||||
actions = {
|
||||
"update-props" = {
|
||||
"bluez5.reconnect-profiles" = [
|
||||
"a2dp_sink"
|
||||
"hfp_hf"
|
||||
"hsp_hs"
|
||||
];
|
||||
# mSBC provides better audio + microphone
|
||||
"bluez5.msbc-support" = true;
|
||||
# SBC XQ provides better audio
|
||||
"bluez5.sbc-xq-support" = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
# Matches all sources
|
||||
{
|
||||
"node.name" = "~bluez_input.*";
|
||||
}
|
||||
# Matches all outputs
|
||||
{
|
||||
"node.name" = "~bluez_output.*";
|
||||
}
|
||||
];
|
||||
actions = {
|
||||
"node.pause-on-idle" = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue