diff --git a/common/fragments/graphical/audio.nix b/common/fragments/graphical/audio.nix index 1606347..4c66a63 100644 --- a/common/fragments/graphical/audio.nix +++ b/common/fragments/graphical/audio.nix @@ -1,4 +1,4 @@ -{ pkgs, config, lib, ... }: { +{ pkgs, lib, ... }: { # Pipewire security.rtkit.enable = true; services.pipewire = { @@ -29,4 +29,62 @@ # User packages users.users.agatha.packages = with pkgs; [ pamixer pavucontrol playerctl ]; + + home-manager.users.agatha = { + services.easyeffects = { + enable = true; + preset = "DT-770-flat-eq"; + }; + + xdg.configFile."easyeffects/output/DT-770-flat-eq.json".text = let + band = num: freq: gain: '' + "band${toString num}": { + "frequency": ${toString freq}, + "gain": ${toString gain}, + "mode": "RLC (BT)", + "mute": false, + "q": 1.41, + "slope": "x1", + "solo": false, + "type": "Bell" + } + ''; + bands = lib.concatStringsSep '' + , + '' [ + (band 0 31.0 5.8) + (band 1 62.0 8.0) + (band 2 125.0 (-8.03)) + (band 3 250.0 (-2.42)) + (band 4 500.0 0.71) + (band 5 1000.0 1.67) + (band 6 2000.0 (-2.42)) + (band 7 4000.0 7.12) + (band 8 8000.0 (-0.61)) + (band 9 16000.0 (-2.58)) + ]; + in '' + { + "output": { + "blocklist": [], + "equalizer": { + "input-gain": 0.0, + "left": { + ${bands} + }, + "mode": "IIR", + "num-bands": 10, + "output-gain": 0.0, + "right": { + ${bands} + }, + "split-channels": false + }, + "plugins_order": [ + "equalizer" + ] + } + } + ''; + }; }