2024-06-12 09:54:11 +07:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.profile.slack;
|
2024-10-20 13:05:15 +07:00
|
|
|
script = pkgs.writeShellScriptBin "slack.sh" ''
|
|
|
|
sleep 10; until ${pkgs.unixtools.ping}/bin/ping -c 1 1.1.1.1; do sleep 1; done; slack
|
|
|
|
'';
|
|
|
|
scriptFile = lib.meta.getExe script;
|
2024-06-12 09:54:11 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home.packages = with pkgs; [ slack ];
|
|
|
|
|
2024-10-20 13:05:15 +07:00
|
|
|
wayland.windowManager.hyprland.settings.exec-once = lib.mkIf cfg.autostart [
|
|
|
|
scriptFile
|
|
|
|
];
|
|
|
|
|
|
|
|
home.file.".config/autostart/slack.sh".source = lib.mkIf cfg.autostart scriptFile;
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
}
|