Regenerated

This commit is contained in:
2026-03-29 14:13:49 +00:00
parent 711d612750
commit 93f059cba4
3 changed files with 372 additions and 426 deletions
+295 -313
View File
File diff suppressed because it is too large Load Diff
+7 -25
View File
@@ -2379,7 +2379,7 @@ in
]; ];
############################ ############################
# User systemd service to start swww, sync wallpapers, and run the script # User systemd service to sync wallpapers and run script
############################ ############################
systemd.user.services.wallpaperSync = { systemd.user.services.wallpaperSync = {
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh"; description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
@@ -2387,34 +2387,14 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
{ config, pkgs, lib, flakeRoot, ... }:
let # Proper shell script invocation
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 = ''
${pkgs.bash}/bin/bash -c ' ${pkgs.bash}/bin/bash -c '
# Ensure destination exists
mkdir -p "${wallpaperDst}" mkdir -p "${wallpaperDst}"
# Copy all wallpapers
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/" rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/" rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
@@ -2427,6 +2407,8 @@ in
fi fi
' '
''; '';
serviceConfig.Restart = "on-failure";
};
############################ ############################
# Timer to run the service every 15 minutes # Timer to run the service every 15 minutes
@@ -19,7 +19,7 @@ in
]; ];
############################ ############################
# User systemd service to start swww, sync wallpapers, and run the script # User systemd service to sync wallpapers and run script
############################ ############################
systemd.user.services.wallpaperSync = { systemd.user.services.wallpaperSync = {
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh"; description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
@@ -27,34 +27,14 @@ in
after = [ "graphical-session.target" ]; after = [ "graphical-session.target" ];
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
{ config, pkgs, lib, flakeRoot, ... }:
let # Proper shell script invocation
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 = ''
${pkgs.bash}/bin/bash -c ' ${pkgs.bash}/bin/bash -c '
# Ensure destination exists
mkdir -p "${wallpaperDst}" mkdir -p "${wallpaperDst}"
# Copy all wallpapers
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/" rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/" rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
@@ -67,6 +47,8 @@ in
fi fi
' '
''; '';
serviceConfig.Restart = "on-failure";
};
############################ ############################
# Timer to run the service every 15 minutes # Timer to run the service every 15 minutes