reformat and clean stuff up
This commit is contained in:
parent
b03b8f6328
commit
2b110a13c0
8 changed files with 363 additions and 504 deletions
54
modules/ezpw.nix
Normal file
54
modules/ezpw.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.ezpw;
|
||||
in
|
||||
{
|
||||
options.services.ezpw = {
|
||||
enable =
|
||||
mkEnableOption
|
||||
"Enable pipewire";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.pulseaudio.enable = lib.mkDefault false;
|
||||
sound.enable = lib.mkDefault false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = lib.mkDefault true;
|
||||
jack.enable = lib.mkDefault true;
|
||||
alsa.enable = lib.mkDefault true;
|
||||
alsa.support32Bit = lib.mkDefault true;
|
||||
pulse.enable = lib.mkDefault true;
|
||||
media-session.config.bluez-monitor = {
|
||||
properties = {
|
||||
"bluez5.codecs" = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ];
|
||||
"bluez5.mdbc-support" = true;
|
||||
};
|
||||
rules = [
|
||||
{
|
||||
actions = {
|
||||
update-props = {
|
||||
"bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
"bluez5.hw-volume" =
|
||||
[ "hfp_ag" "hsp_ag" "a2dp_source" "a2dp_sink" ];
|
||||
};
|
||||
};
|
||||
matches = [{ "device.name" = "~bluez_card.*"; }];
|
||||
}
|
||||
{
|
||||
actions = { update-props = { "node.pause-on-idle" = false; }; };
|
||||
matches = [
|
||||
{ "node.name" = "~bluez_input.*"; }
|
||||
{ "node.name" = "~bluez_output.*"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal.enable = lib.mkDefault true;
|
||||
xdg.portal.gtkUsePortal = lib.mkDefault true;
|
||||
xdg.portal.extraPortals = lib.mkDefault (with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ]);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue