remove wallpaper downloader timer and make it a flake output

This commit is contained in:
Adithya 2024-06-01 02:20:50 +05:30
parent 1aaf49e651
commit 621cd379f5
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
4 changed files with 2 additions and 39 deletions

View file

@ -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

View file

@ -95,6 +95,7 @@
statix statix
]; ];
}; };
packages.getpaper = (import ./extra-packages pkgs).getpaper;
} }
); );
} }

View file

@ -8,6 +8,5 @@
./hypridle.nix ./hypridle.nix
./kanshi.nix ./kanshi.nix
./wpaperd.nix ./wpaperd.nix
./wallpaper.nix
]; ];
} }

View file

@ -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;
};
};
};
};
}