move noisetorch to audio module
This commit is contained in:
@ -19,11 +19,6 @@ in {
|
|||||||
polymc.enable = mkEnableOpt "PolyMC (flatpak)";
|
polymc.enable = mkEnableOpt "PolyMC (flatpak)";
|
||||||
bottles.enable = mkEnableOpt "Bottles (flatpak)";
|
bottles.enable = mkEnableOpt "Bottles (flatpak)";
|
||||||
|
|
||||||
noisetorch = {
|
|
||||||
enable = mkEnableOpt "Noisetorch";
|
|
||||||
autostart = mkBoolOpt false "Autostart Noistorch";
|
|
||||||
};
|
|
||||||
|
|
||||||
steam = {
|
steam = {
|
||||||
enable = mkEnableOpt "Steam (flatpak)";
|
enable = mkEnableOpt "Steam (flatpak)";
|
||||||
protonGE = mkBoolOpt false "Enable Steam Proton GloriousEggroll runner (flatpak)";
|
protonGE = mkBoolOpt false "Enable Steam Proton GloriousEggroll runner (flatpak)";
|
||||||
@ -33,6 +28,7 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
# TODO: Make lib function for multiple assertions that have the same condition
|
||||||
(mkIf cfg.steam.enable {
|
(mkIf cfg.steam.enable {
|
||||||
assertion = cfgfp.enable;
|
assertion = cfgfp.enable;
|
||||||
message = "Cannot enable Steam without the flatpak module!";
|
message = "Cannot enable Steam without the flatpak module!";
|
||||||
@ -52,7 +48,6 @@ in {
|
|||||||
|
|
||||||
# TODO: Extra config (extensions etc), maybe standalone chromium module
|
# TODO: Extra config (extensions etc), maybe standalone chromium module
|
||||||
(optionals cfg.discordChromium.enable [ chromium ])
|
(optionals cfg.discordChromium.enable [ chromium ])
|
||||||
(optionals cfg.noisetorch.enable [ noisetorch ])
|
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.desktopEntries.discordChromium = mkIf cfg.discordChromium.enable {
|
xdg.desktopEntries.discordChromium = mkIf cfg.discordChromium.enable {
|
||||||
@ -64,22 +59,6 @@ in {
|
|||||||
categories = [ "Network" "Chat" ];
|
categories = [ "Network" "Chat" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services = mkIf (cfg.noisetorch.enable && 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
|
# NOTE: Important to not disable this option if another module enables it
|
||||||
modules.flatpak.bottles.enable = mkIf cfg.bottles.enable true;
|
modules.flatpak.bottles.enable = mkIf cfg.bottles.enable true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user