Skip to content

Commit

Permalink
linux-wallpaperengine: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ckgxrg-salt committed Jan 25, 2025
1 parent 90a1a2f commit 9b6a396
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ in import nmtSrc {
./modules/services/imapnotify
./modules/services/kanshi
./modules/services/lieer
./modules/services/linux-wallpaperengine
./modules/services/mopidy
./modules/services/mpd
./modules/services/mpd-mpris
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Install]
WantedBy=graphical-session.target

[Service]
ExecStart=@linux-wallpaperengine@/bin/linux-wallpaperengine --assets-dir /some/path/to/assets --clamping border --fps 6 --scaling fit --screen-root HDMI-1 --bg 12345678 --no-audio-processing --noautomute --screen-root DP-1 --silent --scaling fill --fps 12 --bg 87654321
Restart=on-failure

[Unit]
After=graphical-session.target
Description=Implementation of Wallpaper Engine on Linux
PartOf=graphical-session.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{ config, pkgs, ... }:

{
services.linux-wallpaperengine = {
enable = true;
assetsPath = "/some/path/to/assets";
clamping = "border";
wallpapers = [
{
monitor = "HDMI-1";
wallpaperId = "12345678";
scaling = "fit";
fps = 6;
}
{
monitor = "DP-1";
wallpaperId = "87654321";
extraOptions = [ "--scaling fill" "--fps 12" ];
audio = {
silent = true;
automute = false;
audio-processing = false;
};
}
];
};

test.stubs.linux-wallpaperengine = { };

nmt.script = ''
assertFileContent \
home-files/.config/systemd/user/linux-wallpaperengine.service \
${./basic-configuration-expected.service}
'';
}
1 change: 1 addition & 0 deletions tests/modules/services/linux-wallpaperengine/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ linux-wallpaperengine-basic-configuration = ./basic-configuration.nix; }

0 comments on commit 9b6a396

Please sign in to comment.