Regenerated
This commit is contained in:
+302
-300
File diff suppressed because it is too large
Load Diff
+14
-12
@@ -2361,7 +2361,7 @@ Setting up wallpaper engine + wallpaper gui
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.users.users."traveldroid".name or "traveldroid";
|
||||
username = config.defaultUser or "henrov";
|
||||
homeDir = "/home/${username}";
|
||||
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
||||
wallpaperDst = "${homeDir}/Wallpapers";
|
||||
@@ -2382,24 +2382,26 @@ in
|
||||
# User systemd service to start swww, sync wallpapers, and run the script
|
||||
############################
|
||||
systemd.user.services.wallpaperSync = {
|
||||
description = "Start swww, sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = ''
|
||||
# Start swww daemon if not running
|
||||
pgrep swww >/dev/null 2>&1 || swww &
|
||||
/bin/sh -c '
|
||||
# Ensure destination exists
|
||||
mkdir -p ${wallpaperDst}
|
||||
|
||||
# Ensure destination exists
|
||||
mkdir -p ${wallpaperDst}
|
||||
# Copy all wallpapers
|
||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
|
||||
# Copy wallpapers: overwrite newer files, do not delete existing
|
||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
# Start swww daemon if not running
|
||||
pgrep swww >/dev/null 2>&1 || swww &
|
||||
|
||||
# Execute the logon wallpaper script
|
||||
${scriptFile}
|
||||
# Run the logon wallpaper script if it exists
|
||||
[ -x "${scriptFile}" ] && "${scriptFile}"
|
||||
'
|
||||
'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
@@ -2410,7 +2412,7 @@ in
|
||||
systemd.user.timers.wallpaperSyncTimer = {
|
||||
description = "Run wallpaperSync service every 15 minutes";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig.OnBootSec = "1min"; # run soon after login
|
||||
timerConfig.OnBootSec = "1min";
|
||||
timerConfig.OnUnitActiveSec = "15min";
|
||||
timerConfig.Persistent = true;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, pkgs, lib, flakeRoot, ... }:
|
||||
|
||||
let
|
||||
username = config.users.users."traveldroid".name or "traveldroid";
|
||||
username = config.defaultUser or "henrov";
|
||||
homeDir = "/home/${username}";
|
||||
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
||||
wallpaperDst = "${homeDir}/Wallpapers";
|
||||
@@ -22,24 +22,26 @@ in
|
||||
# User systemd service to start swww, sync wallpapers, and run the script
|
||||
############################
|
||||
systemd.user.services.wallpaperSync = {
|
||||
description = "Start swww, sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.ExecStart = ''
|
||||
# Start swww daemon if not running
|
||||
pgrep swww >/dev/null 2>&1 || swww &
|
||||
/bin/sh -c '
|
||||
# Ensure destination exists
|
||||
mkdir -p ${wallpaperDst}
|
||||
|
||||
# Ensure destination exists
|
||||
mkdir -p ${wallpaperDst}
|
||||
# Copy all wallpapers
|
||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
|
||||
# Copy wallpapers: overwrite newer files, do not delete existing
|
||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||
# Start swww daemon if not running
|
||||
pgrep swww >/dev/null 2>&1 || swww &
|
||||
|
||||
# Execute the logon wallpaper script
|
||||
${scriptFile}
|
||||
# Run the logon wallpaper script if it exists
|
||||
[ -x "${scriptFile}" ] && "${scriptFile}"
|
||||
'
|
||||
'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
@@ -50,7 +52,7 @@ in
|
||||
systemd.user.timers.wallpaperSyncTimer = {
|
||||
description = "Run wallpaperSync service every 15 minutes";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig.OnBootSec = "1min"; # run soon after login
|
||||
timerConfig.OnBootSec = "1min";
|
||||
timerConfig.OnUnitActiveSec = "15min";
|
||||
timerConfig.Persistent = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user