32 lines
784 B
Nix
32 lines
784 B
Nix
{ config, pkgs, lib, flakeRoot, ... }:
|
|
let
|
|
userVideoPath = ".config/nixos_conf/wallpaperstuff/videos/myWallpaper.mp4";
|
|
in
|
|
{
|
|
home.packages = [
|
|
pkgs.mpvpaper
|
|
pkgs.mpv
|
|
];
|
|
systemd.user.services.mpvpaper-wallpaper = {
|
|
Unit = {
|
|
Description = "Video wallpaper (mpvpaper)";
|
|
After = [ "graphical-session.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
Service = {
|
|
Type = "simple";
|
|
ExecStart = ''
|
|
${pkgs.mpvpaper}/bin/mpvpaper \
|
|
-p \
|
|
-o "no-audio --loop-file=inf --no-terminal --really-quiet --panscan=1.0 --keepaspect=yes" \
|
|
'*' "${userVideoPath}"
|
|
'';
|
|
Restart = "on-failure";
|
|
RestartSec = 1;
|
|
};
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
}
|