1

add noisetorch pkg/systemd service to gaming module

This commit is contained in:
2022-08-09 00:22:40 +02:00
parent cd6ad06f98
commit d4dbe62db0

View File

@ -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;