feat: add pipewire wine audio fix and add dropdown terminal to i3

This commit is contained in:
Jacob Bachmann 2024-08-16 19:30:19 +02:00
parent 8e8fdb8fa2
commit e6a98be608
Signed by: bchmnn
GPG key ID: 732A612DAD28067D
7 changed files with 60 additions and 9 deletions

View file

@ -18,7 +18,10 @@
flavour = [ "i3" ];
};
nvidia.enable = true;
audio.enable = true;
audio = {
enable = true;
pipewire-wine-fix.enable = true;
};
bluetooth.enable = false;
printing.enable = true;
vpn.enable = true;

View file

@ -18,7 +18,10 @@
flavour = [ "sway" ];
};
nvidia.enable = false;
audio.enable = true;
audio = {
enable = true;
pipewire-wine-fix.enable = false;
};
bluetooth.enable = true;
printing.enable = true;
vpn.enable = true;

View file

@ -17,7 +17,10 @@
flavour = [ "sway" ];
};
nvidia.enable = false;
audio.enable = true;
audio = {
enable = true;
pipewire-wine-fix.enable = false;
};
bluetooth.enable = true;
printing.enable = true;
vpn.enable = true;

View file

@ -1,5 +1,4 @@
{
services.jackett = {
enable = true;
};
@ -10,12 +9,12 @@
flare-solvarr = {
image = "ghcr.io/flaresolverr/flaresolverr:latest";
autoStart = true;
ports = ["127.0.0.1:8191:8191"];
ports = [ "127.0.0.1:8191:8191" ];
environment = {
LOG_LEVEL = "info";
LOG_HTML = "false";
CAPTCHA_SOLVER = "hcaptcha-solver";
TZ="Europe/Berlin";
TZ = "Europe/Berlin";
};
};
};

View file

@ -1,5 +1,4 @@
{ pkgs, config, lib, ... }: lib.mkIf config.bchmnn.audio.enable {
# Enable pipewire - audio
services.pipewire = lib.mkIf (!builtins.elem "gnome" config.bchmnn.gui.flavour) {
enable = true;
audio.enable = true;
@ -8,11 +7,29 @@
jack.enable = true;
pulse.enable = true;
wireplumber.enable = true;
extraConfig.pipewire = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
"90-wine-config" = {
"context.properties" = {
# "default.clock.rate" = 48000;
# "default.clock.allowed-rates" = [ 48000 ];
# "default.clock.quantum" = 2048;
"default.clock.min-quantum" = 1024;
};
};
};
extraConfig.pipewire-pulse = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
"90-wine-config" = {
"pulse.properties" = {
"pulse.min.req" = "1024/48000";
"pulse.min.frag" = "1024/48000";
"pulse.min.quantum" = "1024/48000";
};
};
};
};
environment.systemPackages = with pkgs; [
alsa-utils
pulseaudio
];
}

View file

@ -24,6 +24,9 @@
audio = {
enable = mkEnableOption "audio";
pipewire-wine-fix = {
enable = mkEnableOption "pipewire-wine-fix";
};
};
bluetooth = {

View file

@ -56,6 +56,7 @@ in
{ command = "${nextcloud-client}/bin/nextcloud"; }
{ command = "${plasma5Packages.kdeconnect-kde}/bin/kdeconnect-indicator"; }
{ command = "${system-config-printer}/bin/system-config-printer-applet"; }
{ command = "${alacritty}/bin/alacritty --class dropdown --title dropdown"; always = true; }
];
fonts = {
names = [ common.font ];
@ -65,6 +66,26 @@ in
window = {
titlebar = false;
border = 4;
commands = [
{
command = "floating enable";
criteria = {
instance = "dropdown";
};
}
{
command = "resize set 1400 800";
criteria = {
instance = "dropdown";
};
}
{
command = "move scratchpad";
criteria = {
instance = "dropdown";
};
}
];
};
gaps = {
inner = 5;
@ -184,10 +205,12 @@ in
# Outer gaps
"${cfg.modifier}+equal" = "gaps horizontal current minus 200; gaps vertical current minus 100";
"${cfg.modifier}+minus" = "gaps horizontal current plus 200; gaps vertical current plus 100";
"${cfg.modifier}+bracketright" = "gaps outer current set 5";
"${cfg.modifier}+bracketleft" = "gaps horizontal current set 800; gaps vertical current set 400";
# Dropdown term
"${cfg.modifier}+grave" = "[instance=\"dropdown\"] scratchpad show; [instance=\"dropdown\"] move position center";
"${cfg.modifier}+Escape" = "[instance=\"dropdown\"] scratchpad show; [instance=\"dropdown\"] move position center";
# Multimedia Keys
"XF86AudioRaiseVolume" = "exec ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+";