Regenerated

This commit is contained in:
2026-03-29 14:11:07 +00:00
parent 804138c34a
commit 711d612750
3 changed files with 399 additions and 333 deletions
+322 -300
View File
File diff suppressed because it is too large Load Diff
+34 -12
View File
@@ -2387,24 +2387,46 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
{ config, pkgs, lib, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
homeDir = "/home/${username}";
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
wallpaperDst = "${homeDir}/Wallpapers";
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
in
{
environment.systemPackages = with pkgs; [
swww
waypaper
jq
rsync
];
systemd.user.services.wallpaperSync = {
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot";
# Use a proper shell script invocation
serviceConfig.ExecStart = '' serviceConfig.ExecStart = ''
/bin/sh -c ' ${pkgs.bash}/bin/bash -c '
# Ensure destination exists mkdir -p "${wallpaperDst}"
mkdir -p ${wallpaperDst} rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
# Copy all wallpapers # Start swww if not running
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
# Start swww daemon if not running
pgrep swww >/dev/null 2>&1 || swww & pgrep swww >/dev/null 2>&1 || swww &
# Run the logon wallpaper script if it exists # Run the logon wallpaper script if executable
[ -x "${scriptFile}" ] && "${scriptFile}" if [ -x "${scriptFile}" ]; then
"${scriptFile}"
fi
' '
''; '';
serviceConfig.Restart = "on-failure";
};
############################ ############################
# Timer to run the service every 15 minutes # Timer to run the service every 15 minutes
@@ -27,24 +27,46 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
{ config, pkgs, lib, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
homeDir = "/home/${username}";
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
wallpaperDst = "${homeDir}/Wallpapers";
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
in
{
environment.systemPackages = with pkgs; [
swww
waypaper
jq
rsync
];
systemd.user.services.wallpaperSync = {
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot";
# Use a proper shell script invocation
serviceConfig.ExecStart = '' serviceConfig.ExecStart = ''
/bin/sh -c ' ${pkgs.bash}/bin/bash -c '
# Ensure destination exists mkdir -p "${wallpaperDst}"
mkdir -p ${wallpaperDst} rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
# Copy all wallpapers # Start swww if not running
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
# Start swww daemon if not running
pgrep swww >/dev/null 2>&1 || swww & pgrep swww >/dev/null 2>&1 || swww &
# Run the logon wallpaper script if it exists # Run the logon wallpaper script if executable
[ -x "${scriptFile}" ] && "${scriptFile}" if [ -x "${scriptFile}" ]; then
"${scriptFile}"
fi
' '
''; '';
serviceConfig.Restart = "on-failure";
};
############################ ############################
# Timer to run the service every 15 minutes # Timer to run the service every 15 minutes