nix/config/Wallpaper.nix

21 lines
361 B
Nix
Raw Normal View History

2025-01-01 19:06:52 +03:00
{
config,
lib,
pkgs,
...
}:
2025-01-01 18:22:32 +03:00
let
cfg = config.module.wallpaper;
2025-01-01 18:22:32 +03:00
in
{
2025-01-01 19:06:52 +03:00
config = lib.mkMerge [
(lib.mkIf (cfg.videoPath != null) {
environment.systemPackages = [
(pkgs.writeShellScriptBin "wallpaper-video" ''
2025-01-01 19:33:03 +03:00
mpvpaper -o 'no-audio --hwdec=auto --loop-file --panscan=1' '*' ${cfg.videoPath}
2025-01-01 19:06:52 +03:00
'')
];
})
];
}