nix/config/Wallpaper.nix

21 lines
370 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.module.wallpaper;
in
{
config = lib.mkMerge [
(lib.mkIf (cfg.videoPath != null) {
environment.systemPackages = [
(pkgs.writeShellScriptBin "wallpaper-video" ''
mpvpaper -o 'no-audio --hwdec=auto --loop-file --panscan=1' '*' ${cfg.videoPath} & disown
'')
];
})
];
}