nixdots/home/programs/graphical/apps/vesktop/default.nix

31 lines
684 B
Nix
Raw Normal View History

2024-06-20 13:37:46 +00:00
{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
2024-06-21 09:41:29 +00:00
cfg = osConfig.myOptions.home-manager.programs.applications.vesktop;
2024-06-20 13:37:46 +00:00
in {
config = mkIf cfg.enable {
2024-07-26 23:07:07 +00:00
home.packages = with pkgs; [vesktop];
2024-06-20 13:37:46 +00:00
systemd.user.services."vesktop" = mkIf cfg.autoStart {
Unit = {
Description = "Vesktop (An alternate client for Discord with Vencord built-in)";
2024-07-26 23:07:07 +00:00
After = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
2024-06-20 13:37:46 +00:00
};
Service = {
Type = "simple";
Restart = "on-failure";
ExecStart = "${pkgs.vesktop}/bin/vesktop";
};
2024-07-26 23:07:07 +00:00
Install.WantedBy = ["graphical-session.target"];
2024-06-20 13:37:46 +00:00
};
};
}