nix/config/Wallpaper.nix

21 lines
370 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" ''
mpvpaper -o 'no-audio --hwdec=auto --loop-file --panscan=1' '*' ${cfg.videoPath} & disown
2025-01-01 19:06:52 +03:00
'')
];
})
];
}