{ self, pkgs, ... }:
{
  systemd.user.services.swww = {
    Install.WantedBy = [ "graphical-session.target" ];

    Unit = {
      After = [ "graphical-session-pre.target" ];
      PartOf = [ "graphical-session.target" ];
    };
    Service = {
      Type = "simple";
      ExecStart = "${pkgs.swww}/bin/swww-daemon";
      Restart = "on-failure";
    };
  };

  systemd.user.services.swww-set-background = {
    Install.WantedBy = [ "graphical-session.target" ];

    Unit = {
      After = [ "graphical-session-pre.target" ];
      PartOf = [ "graphical-session.target" ];
    };

    Service = {
      Type = "oneshot";
      ExecStart = "${pkgs.swww}/bin/swww img ${self + "/assets/landscape-pink-pastel.jpg"} -t wipe";
    };
  };

  home.packages = [ pkgs.swww ];
}
