pipewire by default in ezpc
This commit is contained in:
parent
63d2744755
commit
9fe2ae150c
@ -8,6 +8,8 @@
|
|||||||
config = {
|
config = {
|
||||||
services.haveged.enable = true;
|
services.haveged.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
services.smartd.enable = true;
|
services.smartd.enable = true;
|
||||||
|
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
@ -238,20 +238,8 @@ let
|
|||||||
(lib.lists.range 11 (10 * (builtins.length alphabet) + 10))
|
(lib.lists.range 11 (10 * (builtins.length alphabet) + 10))
|
||||||
) // (
|
) // (
|
||||||
let
|
let
|
||||||
volumeUp = (
|
volumeUp = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
if cfg.haddr != null then
|
volumeDown = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
"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%";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"Print" = "exec ${scrsaveclip}";
|
"Print" = "exec ${scrsaveclip}";
|
||||||
@ -978,12 +966,6 @@ in
|
|||||||
description = "If this PC has bluetooth support";
|
description = "If this PC has bluetooth support";
|
||||||
};
|
};
|
||||||
|
|
||||||
haddr = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
description = "address for ur bluetooth headphones";
|
|
||||||
};
|
|
||||||
|
|
||||||
battery = mkOption {
|
battery = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
@ -18,16 +18,19 @@ let
|
|||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 1900 ];
|
networking.firewall.allowedUDPPorts = [ 1900 ];
|
||||||
|
|
||||||
hardware.pulseaudio.enable = lib.mkDefault (!cfg.portals);
|
hardware.pulseaudio.enable = lib.mkDefault false;
|
||||||
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = lib.mkDefault cfg.portals;
|
enable = lib.mkDefault true;
|
||||||
jack.enable = lib.mkDefault cfg.portals;
|
jack.enable = lib.mkDefault true;
|
||||||
alsa.enable = lib.mkDefault cfg.portals;
|
alsa.enable = lib.mkDefault true;
|
||||||
alsa.support32Bit = lib.mkDefault cfg.portals;
|
alsa.support32Bit = lib.mkDefault true;
|
||||||
pulse.enable = lib.mkDefault cfg.portals;
|
pulse.enable = lib.mkDefault true;
|
||||||
media-session.config.bluez-monitor = {
|
media-session.config.bluez-monitor = {
|
||||||
properties = { };
|
properties = {
|
||||||
|
"bluez5.codecs" = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ];
|
||||||
|
"bluez5.mdbc-support" = true;
|
||||||
|
};
|
||||||
rules = [
|
rules = [
|
||||||
{
|
{
|
||||||
actions = {
|
actions = {
|
||||||
@ -50,9 +53,9 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal.enable = lib.mkDefault cfg.portals;
|
xdg.portal.enable = lib.mkDefault true;
|
||||||
xdg.portal.gtkUsePortal = lib.mkDefault cfg.portals;
|
xdg.portal.gtkUsePortal = lib.mkDefault true;
|
||||||
xdg.portal.extraPortals = lib.mkDefault (if cfg.portals then with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ] else []);
|
xdg.portal.extraPortals = lib.mkDefault (with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ]);
|
||||||
|
|
||||||
# let me use audio and phones
|
# let me use audio and phones
|
||||||
programs.adb.enable = cfg.developer;
|
programs.adb.enable = cfg.developer;
|
||||||
|
Loading…
Reference in New Issue
Block a user