diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-27 16:39:14 -0400 |
commit | 2e4c4298cf84f94d68387e8076fd430e9968ce6c (patch) | |
tree | 2a43fa6d4659fe2585c75aeec3ee4d5e0a42de2e /modules/apps/astal.nix | |
parent | fmt (diff) | |
download | dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.gz dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.tar.bz2 dotfiles-nix-2e4c4298cf84f94d68387e8076fd430e9968ce6c.zip |
refactor
Diffstat (limited to 'modules/apps/astal.nix')
-rw-r--r-- | modules/apps/astal.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/apps/astal.nix b/modules/apps/astal.nix new file mode 100644 index 0000000..e57263e --- /dev/null +++ b/modules/apps/astal.nix @@ -0,0 +1,47 @@ +{ + lib, + config, + pkgs, + inputs, + system, + ... +}: let + astal = inputs.self.packages.${system}; + inherit (lib) mkIf; + cfg = config.apps; +in { + config = mkIf cfg.astal { + default.appLauncher = lib.mkDefault "astal-launcher"; + + home-manager.users.${config.user} = { + home.packages = [ + astal.astal.shell + astal.astal.launcher + ]; + + systemd.user.services.astal = { + Unit = { + Description = "Custom Gtk Lua Shell."; + PartOf = [ + config.default.session + "tray.target" + ]; + After = [config.default.session]; + ConditionEnvironment = "WAYLAND_DISPLAY"; + }; + + Service = { + ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID"; + ExecStart = "${astal.astal.shell}/bin/astal-shell"; + KillMode = "mixed"; + Restart = "on-failure"; + }; + + Install.WantedBy = [ + config.default.session + "tray.target" + ]; + }; + }; + }; +} |