From d4dbe62db0ff0c25a4e1546e886add612e4ae5e1 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Tue, 9 Aug 2022 00:22:40 +0200 Subject: [PATCH] add noisetorch pkg/systemd service to gaming module --- modules/gaming.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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;