nix-infra/common/fragments/graphical/audio.nix

33 lines
863 B
Nix
Raw Normal View History

{ pkgs, config, lib, ... }: {
# Pipewire
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
systemd.user.services."noisetorch" = {
description =
"Virtual microphone device with noise supression for PulseAudio";
after = [ "graphical-session-pre.target" ];
partOf = [ "graphical-session.target" "pipewire.service" ];
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i";
ExecStop = "${pkgs.noisetorch}/bin/noisetorch -u";
Restart = "on-failure";
RestartSec = 5;
RemainAfterExit = true;
};
};
# User packages
users.users.agatha.packages = with pkgs; [ pamixer pavucontrol playerctl ];
}