remove wallpaper downloader timer and make it a flake output
This commit is contained in:
parent
1aaf49e651
commit
621cd379f5
4 changed files with 2 additions and 39 deletions
|
@ -19,7 +19,7 @@ fi
|
||||||
|
|
||||||
CONFIG="$(cat "${CONFIG_FILE}")"
|
CONFIG="$(cat "${CONFIG_FILE}")"
|
||||||
|
|
||||||
DIR="$1"
|
DIR="${1:-}"
|
||||||
if [ -z "${DIR}" ]; then
|
if [ -z "${DIR}" ]; then
|
||||||
DIR="${XDG_PICTURES_DIR:-${HOME}/Pictures}/Wallpapers"
|
DIR="${XDG_PICTURES_DIR:-${HOME}/Pictures}/Wallpapers"
|
||||||
echo "Warning: wallpaper directory not set. using fallback directory ${DIR}" >&2
|
echo "Warning: wallpaper directory not set. using fallback directory ${DIR}" >&2
|
||||||
|
|
|
@ -95,6 +95,7 @@
|
||||||
statix
|
statix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
packages.getpaper = (import ./extra-packages pkgs).getpaper;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,5 @@
|
||||||
./hypridle.nix
|
./hypridle.nix
|
||||||
./kanshi.nix
|
./kanshi.nix
|
||||||
./wpaperd.nix
|
./wpaperd.nix
|
||||||
./wallpaper.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
{ config, extra-packages, ... }:
|
|
||||||
let
|
|
||||||
wallpaper-downloader = "${extra-packages.getpaper}/bin/getpaper";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
systemd.user = {
|
|
||||||
services = {
|
|
||||||
getpaper = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Wallpaper Downloader";
|
|
||||||
After = [ "graphical-session.target" "gnome-keyring.service" ];
|
|
||||||
Wants = "gnome-keyring.service";
|
|
||||||
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
Restart = "on-failure";
|
|
||||||
ExecStart = ''${wallpaper-downloader} "${config.xdg.userDirs.pictures}/Wallpapers"'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
timers = {
|
|
||||||
getpaper = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Wallpaper Downloader";
|
|
||||||
};
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
Timer = {
|
|
||||||
OnCalendar = "00:00:00";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue