nix-da/home/graphical/swww.nix

33 lines
823 B
Nix

{
self,
lib,
pkgs,
config,
...
}:
{
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";
ExecStartPost = "${pkgs.swww}/bin/swww img ${self + "/assets/landscape-pink-pastel.jpg"} -t wipe";
Restart = "on-failure";
ProtectHome = "tmpfs";
BindPaths = "/run/user /home/${config.home.username}/.cache/swww";
ProtectProc = "noaccess";
RestrictNamespaces = true;
CapabilityBoundingSet = "";
PrivateUsers = true;
RestrictAddressFamilies = "AF_UNIX";
} // lib.my.systemdHardening;
};
home.packages = [ pkgs.swww ];
}