1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-14 13:01:09 +01:00

hyprpaper: fix service when no config file

The systemd user service depends on

  config.xdg.configFile."hypr/hyprpaper.conf".source

for `X-Restart-Triggers`. When `cfg.settings` is the default `{}`,
this causes failure since

  config.xdg.configFile."hypr/hyprpaper.conf".source

will not exist.

Making the addition conditional on `cfg.settings` actually having
content, which would mean `xdg.configFile."hypr/hyprpaper.conf"` does
exist, avoids the error.
This commit is contained in:
Sebastián Zavala Villagómez 2024-11-24 08:05:10 -05:00 committed by GitHub
parent 67cd4814a2
commit bd58a1132e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 2 deletions

View file

@ -75,7 +75,7 @@ in {
Description = "hyprpaper";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
X-Restart-Triggers =
X-Restart-Triggers = mkIf (cfg.settings != { })
[ "${config.xdg.configFile."hypr/hyprpaper.conf".source}" ];
};