diff --git a/modules/bugs/default.nix b/modules/bugs/default.nix index 19f54bf1..6c4c938b 100644 --- a/modules/bugs/default.nix +++ b/modules/bugs/default.nix @@ -81,6 +81,17 @@ inputs: power.boot.kernelParams = [ "cpufreq.default_governor=powersave" ]; backlight.boot.kernelParams = [ "nvidia.NVreg_RegistryDwords=EnableBrightnessControl=1" ]; amdpstate.boot.kernelParams = [ "amd_pstate=active" ]; + wireplumber.environment.etc."wireplumber/main.lua.d/50-alsa-config.lua".text = + let + content = builtins.readFile + (inputs.pkgs.wireplumber + "/share/wireplumber/main.lua.d/50-alsa-config.lua"); + matched = builtins.match + ".*\n([[:space:]]*)(--\\[\"session\\.suspend-timeout-seconds\"][^\n]*)[\n].*" content; + spaces = builtins.elemAt matched 0; + comment = builtins.elemAt matched 1; + config = ''["session.suspend-timeout-seconds"] = 0''; + in + builtins.replaceStrings [(spaces + comment)] [(spaces + config)] content; }; in { diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index ffe0a7b6..681c06a6 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -42,17 +42,6 @@ inputs: services.pipewire = { enable = true; alsa = { enable = true; support32Bit = true; }; pulse.enable = true; }; sound.enable = true; security.rtkit.enable = true; - environment.etc."wireplumber/main.lua.d/50-alsa-config.lua".text = - let - content = builtins.readFile - (inputs.pkgs.wireplumber + "/share/wireplumber/main.lua.d/50-alsa-config.lua"); - matched = builtins.match - ".*\n([[:space:]]*)(--\\[\"session\\.suspend-timeout-seconds\"][^\n]*)[\n].*" content; - spaces = builtins.elemAt matched 0; - comment = builtins.elemAt matched 1; - config = ''["session.suspend-timeout-seconds"] = 0''; - in - builtins.replaceStrings [(spaces + comment)] [(spaces + config)] content; } ) # cpus