Compare commits

...

3 Commits

Author SHA1 Message Date
Austin Horstman
e4e78a2cbe tests/linux-wallpaperengine: add execstart test
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-30 08:22:50 -06:00
Austin Horstman
ae1ea768ef linux-wallpaperengine: misc cleanup
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-30 08:22:50 -06:00
Austin Horstman
365cbc13c4 linux-wallpaperengine: fix ExecStart command
Make sure to properly separate command args.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-12-30 08:22:50 -06:00
4 changed files with 38 additions and 9 deletions

View File

@@ -8,7 +8,6 @@ let
inherit (lib) mkOption types;
cfg = config.services.linux-wallpaperengine;
in
{
meta.maintainers = [ lib.hm.maintainers.ckgxrg ];
@@ -105,10 +104,10 @@ in
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.linux-wallpaperengine" pkgs lib.platforms.linux)
({
{
assertion = cfg.wallpapers != null;
message = "linux-wallpaperengine: You must set at least one wallpaper";
})
}
];
home.packages = [ cfg.package ];
@@ -121,7 +120,7 @@ in
lib.cli.toGNUCommandLine { } {
screen-root = each.monitor;
inherit (each) scaling fps;
silent = each.audio.silent;
inherit (each.audio) silent;
noautomute = !each.audio.automute;
no-audio-processing = !each.audio.processing;
}
@@ -138,11 +137,12 @@ in
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart =
lib.getExe cfg.package
+ (lib.optionalString (cfg.assetsPath != null) " --assets-dir ${cfg.assetsPath} ")
+ (lib.optionalString (cfg.clamping != null) "--clamping ${cfg.clamping} ")
+ (lib.strings.concatStringsSep " " args);
ExecStart = lib.concatStringsSep " " (
[ (lib.getExe cfg.package) ]
++ lib.optional (cfg.assetsPath != null) "--assets-dir ${cfg.assetsPath}"
++ lib.optional (cfg.clamping != null) "--clamping ${cfg.clamping}"
++ args
);
Restart = "on-failure";
};
Install = {

View File

@@ -3,4 +3,5 @@
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
linux-wallpaperengine-basic-configuration = ./basic-configuration.nix;
linux-wallpaperengine-null-options = ./null-options.nix;
linux-wallpaperengine-missing-spaces = ./missing-spaces.nix;
}

View File

@@ -0,0 +1,11 @@
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@linux-wallpaperengine@/bin/linux-wallpaperengine --screen-root HDMI-A-1 --bg 2902931482
Restart=on-failure
[Unit]
After=graphical-session.target
Description=Implementation of Wallpaper Engine on Linux
PartOf=graphical-session.target

View File

@@ -0,0 +1,17 @@
{
services.linux-wallpaperengine = {
enable = true;
wallpapers = [
{
monitor = "HDMI-A-1";
wallpaperId = "2902931482";
}
];
};
nmt.script = ''
assertFileContent \
home-files/.config/systemd/user/linux-wallpaperengine.service \
${./missing-spaces-expected.service}
'';
}