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