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
cfg = config.module.wallpaper;
in
{
config = {
environment.systemPackages = [
(pkgs.writeShellScriptBin "wallpaper-video" ''
mpvpaper -o 'no-audio --loop-file --panscan=1' '*' ${cfg.videoPath}
'')
];
};
config = lib.mkMerge [
(lib.mkIf (cfg.videoPath != null) {
environment.systemPackages = [
(pkgs.writeShellScriptBin "wallpaper-video" ''
mpvpaper -o 'no-audio --loop-file --panscan=1' '*' ${cfg.videoPath}
'')
];
})
];
}