diff --git a/common/fragments/graphical/audio.nix b/common/fragments/graphical/audio.nix new file mode 100644 index 0000000..1606347 --- /dev/null +++ b/common/fragments/graphical/audio.nix @@ -0,0 +1,32 @@ +{ 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 ]; +} diff --git a/common/fragments/graphical/default.nix b/common/fragments/graphical/default.nix index 729e813..744ece1 100644 --- a/common/fragments/graphical/default.nix +++ b/common/fragments/graphical/default.nix @@ -2,6 +2,7 @@ imports = [ ./bspwm.nix ./picom.nix + ./audio.nix ./polybar.nix ./dunst.nix ./rofi.nix @@ -17,7 +18,6 @@ broot colmena element-desktop - firefox flameshot glib gnome.eog @@ -33,10 +33,7 @@ magic-wormhole neofetch nitrogen - pamixer - pavucontrol pfetch - playerctl pridefetch rofi-calc rofimoji @@ -146,12 +143,25 @@ sparseCheckout = [ "ZorinPurple-Dark" ]; }; }; + + programs.direnv.enable = true; + home.sessionVariables = { "DIRENV_LOG_FORMAT" = ""; }; }; services.gvfs.enable = true; security.polkit.enable = true; + programs.dconf.enable = true; programs.geary.enable = true; + programs.steam.enable = true; + + programs.firefox = { + enable = true; + autoConfig = '' + pref("privacy.webrtc.legacyGlobalIndicator", false); + pref("privacy.webrtc.hideGlobalIndicator", true); + ''; + }; # Screenshare on wlroots xdg = { @@ -182,15 +192,4 @@ ]; services.printing.enable = true; - - # Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - programs.noisetorch.enable = true; }