{ lib, config, pkgs, ... }: let astal = pkgs.astal.override { inherit (config.options) theme; }; inherit (lib) mkIf; cfg = config.apps.astal; # astal is hyprland only session = "hyprland-session.target"; in { config = mkIf cfg.enable { default.appLauncher = lib.mkDefault "astal-launcher"; home.packages = [ astal.shell astal.launcher ]; systemd.user.services.astal = { Install = { WantedBy = [session "tray.target"]; }; Unit = { ConditionEnvironment = "WAYLAND_DISPLAY"; Description = "astal"; After = [session]; PartOf = [session "tray.target"]; }; Service = { ExecStart = "${astal.shell}/bin/astal-shell"; Restart = "always"; RestartSec = "10"; }; }; }; }