diff --git a/modules/gaming.nix b/modules/gaming.nix index bd4a1aa6..d8b3e2ca 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -52,6 +52,7 @@ in { # TODO: Extra config (extensions etc), maybe standalone chromium module (optionals cfg.discordChromium.enable [ chromium ]) + (optionals cfg.noisetorch.enable [ noisetorch ]) ]; xdg.desktopEntries.discordChromium = mkIf cfg.discordChromium.enable { @@ -63,6 +64,23 @@ in { categories = [ "Network" "Chat" ]; }; + # TODO: Check if this works after fresh login + systemd.user.services = mkIf cfg.noisetorch.autostart { + noisetorch-autostart = { + Unit = { + Description = "Noisetorch noise suppression"; + PartOf = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Install.WantedBy = [ "graphical-session.target" ]; + Service = { + Type = "oneshot"; + Environment = "PATH=/etc/profiles/per-user/${config.home.username}/bin"; + ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i"; + }; + }; + }; + # NOTE: Important to not disable this option if another module enables it modules.flatpak.bottles.enable = mkIf cfg.bottles.enable true;