improve portals config

This commit is contained in:
notgne2 2021-05-23 22:51:00 -07:00
parent 076dc136fe
commit b0185b66f8
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8
3 changed files with 30 additions and 10 deletions

View File

@ -579,7 +579,6 @@ let
ECORE_EVAS_ENGINE = "wayland_egl"; ECORE_EVAS_ENGINE = "wayland_egl";
ELM_ENGINE = "wayland_egl"; ELM_ENGINE = "wayland_egl";
_JAVA_AWT_WM_NONREPARENTING = "1"; _JAVA_AWT_WM_NONREPARENTING = "1";
XDG_CURRENT_DESKTOP = "Unity";
}; };
programs.waybar = { programs.waybar = {

View File

@ -20,19 +20,39 @@ let
hardware.pulseaudio.enable = lib.mkDefault (!cfg.portals); hardware.pulseaudio.enable = lib.mkDefault (!cfg.portals);
services.pipewire.enable = lib.mkDefault cfg.portals; services.pipewire = {
services.pipewire.jack.enable = lib.mkDefault cfg.portals; enable = lib.mkDefault cfg.portals;
services.pipewire.alsa.enable = lib.mkDefault cfg.portals; jack.enable = lib.mkDefault cfg.portals;
services.pipewire.alsa.support32Bit = lib.mkDefault cfg.portals; alsa.enable = lib.mkDefault cfg.portals;
services.pipewire.pulse.enable = lib.mkDefault cfg.portals; alsa.support32Bit = lib.mkDefault cfg.portals;
pulse.enable = lib.mkDefault cfg.portals;
media-session.config.bluez-monitor = {
properties = { };
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 cfg.portals; xdg.portal.enable = lib.mkDefault cfg.portals;
xdg.portal.gtkUsePortal = 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.extraPortals = lib.mkDefault (if cfg.portals then with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ] else []);
# https://github.com/NixOS/nixpkgs/issues/108855
systemd.user.services.xdg-desktop-portal.environment = lib.mkDefault (lib.mkIf cfg.portals {
XDG_DESKTOP_PORTAL_DIR = config.environment.variables.XDG_DESKTOP_PORTAL_DIR;
});
# let me use audio and phones # let me use audio and phones
programs.adb.enable = cfg.developer; programs.adb.enable = cfg.developer;

View File

@ -66,6 +66,7 @@ in
# make fonts not fucked up # make fonts not fucked up
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
fonts.fontconfig.dpi = lib.mkDefault 96; fonts.fontconfig.dpi = lib.mkDefault 96;
fonts.enableDefaultFonts = true;
services.xserver.dpi = lib.mkDefault 96; services.xserver.dpi = lib.mkDefault 96;
# this helps with some compatibility # this helps with some compatibility