mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
Compare commits
3 Commits
d99b4ca5de
...
e4e78a2cbe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4e78a2cbe | ||
|
|
ae1ea768ef | ||
|
|
365cbc13c4 |
@@ -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 = {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -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}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user