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

34 lines
794 B
Nix
Raw Normal View History

2024-06-23 18:17:08 +00:00
{
lib,
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = osConfig.myOptions.home-manager.programs.applications.webcord;
in {
config = mkIf cfg.enable {
2024-07-26 23:07:07 +00:00
home.packages = with pkgs; [
2024-06-23 18:17:08 +00:00
# Webcord with vencord extension installed
webcord-vencord
];
systemd.user.services."webcord" = mkIf cfg.autoStart {
Unit = {
Description = "Webcord (An electron-based Discord client implemented without Discord API with Vencord built-in)";
2024-07-26 23:07:07 +00:00
After = ["graphical-session.target"];
PartOf = ["graphical-session.target"];
2024-06-23 18:17:08 +00:00
};
Service = {
Type = "simple";
Restart = "on-failure";
ExecStart = "${pkgs.webcord-vencord}/bin/webcord";
};
2024-07-26 23:07:07 +00:00
Install.WantedBy = ["graphical-session.target"];
2024-06-23 18:17:08 +00:00
};
};
}