mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-29 13:04:34 +00:00
35 lines
802 B
Nix
35 lines
802 B
Nix
|
{
|
||
|
lib,
|
||
|
osConfig,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: let
|
||
|
inherit (lib) mkIf;
|
||
|
|
||
|
cfg = osConfig.myOptions.home-manager.programs.applications.webcord;
|
||
|
in {
|
||
|
config = mkIf cfg.enable {
|
||
|
home.packages = with pkgs; [
|
||
|
# 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)";
|
||
|
After = [ "graphical-session.target" ];
|
||
|
PartOf = [ "graphical-session.target" ];
|
||
|
};
|
||
|
|
||
|
Service = {
|
||
|
Type = "simple";
|
||
|
Restart = "on-failure";
|
||
|
ExecStart = "${pkgs.webcord-vencord}/bin/webcord";
|
||
|
};
|
||
|
|
||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|