diff --git a/home-manager/common.nix b/home-manager/common.nix index 1e46352..be8f4e0 100644 --- a/home-manager/common.nix +++ b/home-manager/common.nix @@ -59,6 +59,8 @@ inputs: all: { iotop htop + + corefonts ]; programs.starship = { diff --git a/home-manager/modules/de2u.nix b/home-manager/modules/de2u.nix index 7c05df2..2a2927a 100644 --- a/home-manager/modules/de2u.nix +++ b/home-manager/modules/de2u.nix @@ -207,24 +207,26 @@ in { "org/gnome/shell" = { disable-user-extensions = false; disabled-extensions = [""]; - enabled-extensions = [ - "rrc@ogarcia.me" - "native-window-placement@gnome-shell-extensions.gcampax.github.com" - "user-theme@gnome-shell-extensions.gcampax.github.com" - "improved-workspace-indicator@michaelaquilina.github.io" - "Vitals@CoreCoding.com" - "clipboard-indicator@tudmotu.com" - "just-perfection-desktop@just-perfection" - "appindicatorsupport@rgcjonas.gmail.com" - "launch-new-instance@gnome-shell-extensions.gcampax.github.com" - "unite@hardpixel.eu" - "gamemode@christian.kellner.me" - # "compiz-windows-effect@hermes83.github.com" - "bluetooth-quick-connect@bjarosze.gmail.com" - "gsconnect@andyholmes.github.io" - # "desktop-cube@schneegans.github.com" - "sound-output-device-chooser@kgshank.net" - ] ++ (lib.optional cfg.tiling "forge@jmmaranan.com"); + enabled-extensions = + [ + "rrc@ogarcia.me" + "native-window-placement@gnome-shell-extensions.gcampax.github.com" + "user-theme@gnome-shell-extensions.gcampax.github.com" + "improved-workspace-indicator@michaelaquilina.github.io" + "Vitals@CoreCoding.com" + "clipboard-indicator@tudmotu.com" + "just-perfection-desktop@just-perfection" + "appindicatorsupport@rgcjonas.gmail.com" + "launch-new-instance@gnome-shell-extensions.gcampax.github.com" + "unite@hardpixel.eu" + "gamemode@christian.kellner.me" + # "compiz-windows-effect@hermes83.github.com" + "bluetooth-quick-connect@bjarosze.gmail.com" + "gsconnect@andyholmes.github.io" + # "desktop-cube@schneegans.github.com" + "sound-output-device-chooser@kgshank.net" + ] + ++ (lib.optional cfg.tiling "forge@jmmaranan.com"); }; "org/gnome/desktop/peripherals/touchpad" = { natural-scroll = false; diff --git a/modules/ezpw.nix b/modules/ezpw.nix index 1553d55..faf03cb 100644 --- a/modules/ezpw.nix +++ b/modules/ezpw.nix @@ -38,7 +38,7 @@ in { quantum = mkOption { type = types.int; description = "Pipewire quantum in low latency mode"; - default = 64; + default = 32; }; }; @@ -64,31 +64,62 @@ in { pulseaudio ]; - environment.etc."wireplumber/main.lua.d/51-alsa-config.lua" = mkIf cfg.lowLatency { - text = '' - alsa_monitor.properties = { - ["audio.rate"] = ${ - toString (cfg.rate - * ( - if cfg.usbSoundcard - then 2 - else 1 - )) - }, - ["audio.format"] = "S32LE", - ["api.alsa.headroom"] = 512, - ["api.alsa.period-size"] = ${toString cfg.periodSize} - } - ''; + services.pipewire.extraConfig.pipewire."92-low-latency" = mkIf cfg.lowLatency { + context.properties = { + default.clock.rate = cfg.rate; + default.clock.quantum = cfg.quantum; + default.clock.min-quantum = cfg.quantum; + default.clock.max-quantum = cfg.quantum; + }; }; - environment.etc."wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = '' - bluez_monitor.properties = { - ["bluez5.enable-sbc-xq"] = true, - ["bluez5.enable-msbc"] = true, - ["bluez5.enable-hw-volume"] = true, - ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" - } - ''; + services.pipewire.extraConfig.pipewire-pulse."92-low-latency" = mkIf cfg.lowLatency { + context.modules = [ + { + name = "libpipewire-module-protocol-pulse"; + args = { + pulse.min.req = qr; + pulse.default.req = qr; + pulse.max.req = qr; + pulse.min.quantum = qr; + pulse.max.quantum = qr; + }; + } + ]; + stream.properties = { + node.latency = qr; + resample.quality = 1; + }; + }; + + services.pipewire.wireplumber.configPackages = + [ + (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" '' + bluez_monitor.properties = { + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-hw-volume"] = true, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + } + '') + ] + ++ optional cfg.lowLatency (pkgs.writeTextDir "share/wireplumber/main.lua.d/99-alsa-lowlatency.lua" '' + alsa_monitor.rules = { + { + matches = {{{ "node.name", "matches", "alsa_output.*" }}}; + apply_properties = { + ["audio.format"] = "S32LE", + ["audio.rate"] = "${toString (cfg.rate + * ( + if cfg.usbSoundcard + then 2 + else 1 + ))}", -- for USB soundcards it should be twice your desired rate + ["api.alsa.period-size"] = ${toString cfg.periodSize}, -- defaults to 1024, tweak by trial-and-error + -- ["api.alsa.disable-batch"] = true, -- generally, USB soundcards use the batch mode + }, + }, + } + ''); }; } diff --git a/modules/workstation.nix b/modules/workstation.nix index b52f62e..f8b255e 100644 --- a/modules/workstation.nix +++ b/modules/workstation.nix @@ -36,7 +36,11 @@ in { }; boot = { - consoleLogLevel = lib.mkDefault (if cfg.fancyBoot then 0 else 3); + consoleLogLevel = lib.mkDefault ( + if cfg.fancyBoot + then 0 + else 3 + ); initrd.verbose = lib.mkDefault (!cfg.fancyBoot); plymouth.enable = lib.mkDefault cfg.fancyBoot; kernelParams = lib.mkIf cfg.fancyBoot [