1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

swaync: use lib.getExe (#6755)

This commit is contained in:
Austin Horstman 2025-04-04 10:30:26 -07:00 committed by GitHub
parent bb036cb353
commit 07547d29e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,20 +79,20 @@ in {
config = lib.mkIf cfg.enable {
# at-spi2-core is to minimize journalctl noise of:
# "AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files"
home.packages =
lib.mkIf (cfg.package != null) [ cfg.package pkgs.at-spi2-core ];
home.packages = [ cfg.package pkgs.at-spi2-core ];
xdg.configFile = {
"swaync/config.json" = {
source = jsonFormat.generate "config.json" cfg.settings;
onChange = "${cfg.package}/bin/swaync-client --reload-config";
onChange = "${lib.getExe' cfg.package "swaync-client"} --reload-config";
};
"swaync/style.css" = lib.mkIf (cfg.style != null) {
source = if builtins.isPath cfg.style || lib.isStorePath cfg.style then
cfg.style
else
pkgs.writeText "swaync/style.css" cfg.style;
onChange = "${cfg.package}/bin/swaync-client --reload-css";
onChange = "${lib.getExe' cfg.package "swaync-client"} --reload-css";
};
};
@ -108,7 +108,7 @@ in {
Service = {
Type = "dbus";
BusName = "org.freedesktop.Notifications";
ExecStart = "${cfg.package}/bin/swaync";
ExecStart = "${lib.getExe cfg.package}";
Restart = "on-failure";
};