diff --git a/config/hosts/aspects/doloro-desktop/home.nix b/config/hosts/aspects/doloro-desktop/home.nix index 9bbc42b..1f33d7b 100644 --- a/config/hosts/aspects/doloro-desktop/home.nix +++ b/config/hosts/aspects/doloro-desktop/home.nix @@ -13,6 +13,7 @@ modules.sops modules.flatpaks modules.gamemode + modules.gameaudio modules.hyprland modules.fish modules.tuigreet diff --git a/config/modules/gameaudio.nix b/config/modules/gameaudio.nix new file mode 100644 index 0000000..3192e3e --- /dev/null +++ b/config/modules/gameaudio.nix @@ -0,0 +1,27 @@ +{ + modules, + ... +}: +{ + modules.gameaudio = { + homeManager = + { + pkgs, + ... + }: + { + home.packages = [ + # Launch a program with all of its audio routed to GameAudioSink. + # Usage: run-on-gameaudio [args...] + (pkgs.writeShellScriptBin "run-on-gameaudio" '' + if [ "$#" -eq 0 ]; then + echo "usage: run-on-gameaudio [args...]" >&2 + exit 1 + fi + export PIPEWIRE_PROPS="target.object=GameAudioSink" + exec "$@" + '') + ]; + }; + }; +} \ No newline at end of file