Wallpaper: Fix non-video build.

This commit is contained in:
Dmitry Voronin 2025-01-01 19:06:52 +03:00
parent 03fb7207c8
commit 3252822100
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

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