pipewire by default in ezpc

This commit is contained in:
notgne2 2021-09-02 10:44:32 -07:00
parent 63d2744755
commit 9fe2ae150c
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8
3 changed files with 17 additions and 30 deletions

View File

@ -8,6 +8,8 @@
config = {
services.haveged.enable = true;
security.rtkit.enable = true;
services.smartd.enable = true;
hardware.enableAllFirmware = true;

View File

@ -238,20 +238,8 @@ let
(lib.lists.range 11 (10 * (builtins.length alphabet) + 10))
) // (
let
volumeUp = (
if cfg.haddr != null then
"exec ${pkgs.qt5.qttools.bin}/bin/qdbus --system org.bluez ${cfg.haddr} org.bluez.MediaControl1.VolumeUp || "
else
"exec "
)
+ "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
volumeDown = (
if cfg.haddr != null then
"exec ${pkgs.qt5.qttools.bin}/bin/qdbus --system org.bluez ${cfg.haddr} org.bluez.MediaControl1.VolumeDown || "
else
"exec "
)
+ "${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
volumeUp = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
volumeDown = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
in
{
"Print" = "exec ${scrsaveclip}";
@ -978,12 +966,6 @@ in
description = "If this PC has bluetooth support";
};
haddr = mkOption {
type = types.nullOr types.str;
default = null;
description = "address for ur bluetooth headphones";
};
battery = mkOption {
type = types.bool;
default = false;

View File

@ -18,16 +18,19 @@ let
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ 1900 ];
hardware.pulseaudio.enable = lib.mkDefault (!cfg.portals);
hardware.pulseaudio.enable = lib.mkDefault false;
services.pipewire = {
enable = lib.mkDefault cfg.portals;
jack.enable = lib.mkDefault cfg.portals;
alsa.enable = lib.mkDefault cfg.portals;
alsa.support32Bit = lib.mkDefault cfg.portals;
pulse.enable = lib.mkDefault cfg.portals;
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 = { };
properties = {
"bluez5.codecs" = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ];
"bluez5.mdbc-support" = true;
};
rules = [
{
actions = {
@ -50,9 +53,9 @@ let
};
};
xdg.portal.enable = lib.mkDefault cfg.portals;
xdg.portal.gtkUsePortal = lib.mkDefault cfg.portals;
xdg.portal.extraPortals = lib.mkDefault (if cfg.portals then with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ] else []);
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 ]);
# let me use audio and phones
programs.adb.enable = cfg.developer;