diff --git a/hosts/eddie/configuration.nix b/hosts/eddie/configuration.nix index aaa1f4a..48cfdbf 100644 --- a/hosts/eddie/configuration.nix +++ b/hosts/eddie/configuration.nix @@ -16,6 +16,7 @@ niri kanata filesystems + sound ]; nixpkgs = { @@ -178,12 +179,6 @@ brillo.enable = true; }; - musnix = { - enable = true; - alsaSeq.enable = true; - rtcqs.enable = true; - }; - services.fstrim.enable = true; services.logind = { @@ -351,88 +346,6 @@ ]; }; - # Enable sound with pipewire. - services.pulseaudio.enable = false; - - services.pipewire = { - enable = true; - - alsa = { - enable = true; - support32Bit = true; - }; - - pulse.enable = true; - jack.enable = true; - - wireplumber = { - enable = true; - }; - - extraConfig = { - pipewire."91-null-sinks" = { - "context.modules" = [ - { - name = "libpipewire-module-loopback"; - args = { - "node.description" = "Default Playback"; - "capture.props" = { - "node.name" = "BixSix_or_fallback_Playback"; - "media.class" = "Audio/Sink"; - "audio.position" = "[FL FR]"; - }; - "playback.props" = { - "node.name" = "playback.BixSixWithFallbackPlayback"; - "audio.position" = "[AUX14 AUX15]"; - "target.object" = "alsa_output.usb-Solid_State_Logic_BiG_SiX-00.pro-output-0"; - "stream.dont-remix" = true; - "node.passive" = true; - }; - }; - } - ]; - }; - pipewire."92-low-latency" = { - context.properties = { - default.clock.rate = 48000; - default.clock.quantum = 32; - default.clock.min-quantum = 32; - default.clock.max-quantum = 32; - }; - }; - pipewire-pulse."92-low-latency" = { - context.modules = [ - { - name = "libpipewire-module-protocol-pulse"; - args = { - pulse.min.req = "32/48000"; - pulse.default.req = "32/48000"; - pulse.max.req = "32/48000"; - pulse.min.quantum = "32/48000"; - pulse.max.quantum = "32/48000"; - }; - } - ]; - stream.properties = { - node.latency = "32/48000"; - resample.quality = 1; - }; - }; - pipewire."10-airplay" = { - "context.modules" = [ - { - name = "libpipewire-module-raop-discover"; - - # increase the buffer size if you get dropouts/glitches - # args = { - # "raop.latency.ms" = 500; - # }; - } - ]; - }; - }; - }; - programs.steam = { enable = true; protontricks.enable = true; diff --git a/modules/home/hypridle.nix b/modules/home/hypridle.nix index 959582b..3353c5a 100644 --- a/modules/home/hypridle.nix +++ b/modules/home/hypridle.nix @@ -7,6 +7,7 @@ general = { lock_cmd = "pidof hyprlock || hyprlock"; before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "shikanectl reload && brillo -e -u 150000 -I"; ignore_dbus_inhibit = false; ignore_systemd_inhibit = false; }; @@ -18,7 +19,6 @@ { timeout = "60"; on-timeout = "systemd-ac-power || dim-all-monitors"; - on-resume = "brillo -e -u 150000 -I"; } { timeout = "120"; @@ -33,7 +33,6 @@ { timeout = "90"; on-timeout = "systemd-ac-power && dim-all-monitors"; - on-resume = "brillo -e -u 150000 -I"; } { diff --git a/modules/system/sound.nix b/modules/system/sound.nix new file mode 100644 index 0000000..43b6e0f --- /dev/null +++ b/modules/system/sound.nix @@ -0,0 +1,91 @@ +{ config, lib, pkgs, ... }: + +{ + # Enable sound with pipewire. + services.pulseaudio.enable = false; + + musnix = { + enable = true; + alsaSeq.enable = true; + rtcqs.enable = true; + }; + + services.pipewire = { + enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + + pulse.enable = true; + jack.enable = true; + + wireplumber = { + enable = true; + }; + + extraConfig = { + pipewire."91-null-sinks" = { + "context.modules" = [ + { + name = "libpipewire-module-loopback"; + args = { + "node.description" = "Default Playback"; + "capture.props" = { + "node.name" = "BixSix_or_fallback_Playback"; + "media.class" = "Audio/Sink"; + "audio.position" = "[FL FR]"; + }; + "playback.props" = { + "node.name" = "playback.BixSixWithFallbackPlayback"; + "audio.position" = "[AUX14 AUX15]"; + "target.object" = "alsa_output.usb-Solid_State_Logic_BiG_SiX-00.pro-output-0"; + "stream.dont-remix" = true; + "node.passive" = true; + }; + }; + } + ]; + }; + pipewire."92-low-latency" = { + context.properties = { + default.clock.rate = 48000; + default.clock.quantum = 32; + default.clock.min-quantum = 32; + default.clock.max-quantum = 32; + }; + }; + pipewire-pulse."92-low-latency" = { + context.modules = [ + { + name = "libpipewire-module-protocol-pulse"; + args = { + pulse.min.req = "32/48000"; + pulse.default.req = "32/48000"; + pulse.max.req = "32/48000"; + pulse.min.quantum = "32/48000"; + pulse.max.quantum = "32/48000"; + }; + } + ]; + stream.properties = { + node.latency = "32/48000"; + resample.quality = 1; + }; + }; + pipewire."10-airplay" = { + "context.modules" = [ + { + name = "libpipewire-module-raop-discover"; + + # increase the buffer size if you get dropouts/glitches + # args = { + # "raop.latency.ms" = 500; + # }; + } + ]; + }; + }; + }; +}