nix-da/home/graphical/swww.nix

34 lines
833 B
Nix

{
self,
lib,
pkgs,
config,
...
}:
{
systemd.user.services.swww = {
Install.WantedBy = [ "graphical-session.target" ];
Unit = {
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.swww}/bin/swww-daemon";
ExecStartPost = "${pkgs.swww}/bin/swww img ${
self + "/assets/landscape-pink-pastel.jpg"
} -t wipe --transition-fps 144";
Restart = "on-failure";
BindPaths = "/run/user /home/${config.home.username}/.cache/swww";
TemporaryFileSystem = "/home /run/user /root";
ProtectProc = "noaccess";
RestrictNamespaces = true;
CapabilityBoundingSet = "";
PrivateUsers = true;
RestrictAddressFamilies = "AF_UNIX";
} // lib.my.systemdHardening;
};
home.packages = [ pkgs.swww ];
}