discord: moved to vesktop
This commit is contained in:
parent
7b80013e74
commit
3490576ddb
|
@ -202,7 +202,6 @@ in
|
||||||
|
|
||||||
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
|
source=${config.home.homeDirectory}/.cache/wallust/hyprland.conf
|
||||||
|
|
||||||
exec-once=bash -c "sleep 10; until ping -c 1 discord.com; do sleep 1; done; discord"
|
|
||||||
exec-once=bash -c "sleep 10; until ping -c 1 google.com; do sleep 1; done; slack"
|
exec-once=bash -c "sleep 10; until ping -c 1 google.com; do sleep 1; done; slack"
|
||||||
exec-once=bash -c "sleep 10; until ping -c 1 nextcloud.tigor.web.id; do sleep 1; done; nextcloud --background"
|
exec-once=bash -c "sleep 10; until ping -c 1 nextcloud.tigor.web.id; do sleep 1; done; nextcloud --background"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -6,47 +6,17 @@ in
|
||||||
{
|
{
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
discord
|
vesktop
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.user = lib.mkIf cfg.autostart {
|
home.file = {
|
||||||
services.discord = {
|
".config/discord/settings.json".text = builtins.toJSON {
|
||||||
Unit = {
|
SKIP_HOST_UPDATE = true;
|
||||||
Description = "Automatically start Discord on Login";
|
|
||||||
# Only runs on sessions with a graphical target like X11 or Wayland.
|
|
||||||
Wants = [ "graphical.target" ];
|
|
||||||
StartLimitIntervalSec = 300;
|
|
||||||
StartLimitBurst = 10;
|
|
||||||
};
|
|
||||||
Service =
|
|
||||||
let
|
|
||||||
bash = "${pkgs.bash}/bin/bash";
|
|
||||||
ping = "${pkgs.unixtools.ping}/bin/ping";
|
|
||||||
host = "discord.com";
|
|
||||||
sleep = "${pkgs.coreutils}/bin/sleep";
|
|
||||||
discord = "${pkgs.discord}/bin/discord";
|
|
||||||
exec = ''${bash} -c "until ${ping} -c 1 ${host}; do ${sleep} 1; done; ${discord}"'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
Type = "simple";
|
|
||||||
ExecStartPre = "${sleep} 5";
|
|
||||||
ExecStart = exec;
|
|
||||||
Restart = "on-failure";
|
|
||||||
RemainAfterExit = "yes";
|
|
||||||
Environment = [ "NIXOS_OZONE_WL=1" ];
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "default.target" ]; # After user login.
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [
|
||||||
".config/discord/settings.json".text = ''
|
"sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 discord.com; do sleep 1; done; vesktop"
|
||||||
{
|
];
|
||||||
"SKIP_HOST_UPDATE": true
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
autostart = lib.mkEnableOption "discord autostart";
|
autostart = lib.mkEnableOption "discord autostart";
|
||||||
window_rule = lib.mkOption {
|
window_rule = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "workspace 7 silent,class:(discord)";
|
default = "workspace 7 silent,class:((?=discord|vesktop))";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,10 @@ in
|
||||||
suspendTimeout = 7200;
|
suspendTimeout = 7200;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
discord.enable = true;
|
discord = {
|
||||||
|
enable = true;
|
||||||
|
autostart = true;
|
||||||
|
};
|
||||||
slack.enable = true;
|
slack.enable = true;
|
||||||
whatsapp = {
|
whatsapp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue