NixOS/home/programs/slack.nix

20 lines
528 B
Nix
Raw Normal View History

2024-06-12 09:54:11 +07:00
{ pkgs, lib, config, ... }:
let
cfg = config.profile.slack;
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 ];
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
};
}