Regenerated
This commit is contained in:
+325
-303
File diff suppressed because it is too large
Load Diff
+37
-15
@@ -2387,24 +2387,46 @@ in
|
|||||||
after = [ "graphical-session.target" ];
|
after = [ "graphical-session.target" ];
|
||||||
|
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
serviceConfig.ExecStart = ''
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
/bin/sh -c '
|
|
||||||
# Ensure destination exists
|
|
||||||
mkdir -p ${wallpaperDst}
|
|
||||||
|
|
||||||
# Copy all wallpapers
|
let
|
||||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
username = config.defaultUser or "henrov";
|
||||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
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
|
||||||
|
];
|
||||||
|
|
||||||
# Start swww daemon if not running
|
systemd.user.services.wallpaperSync = {
|
||||||
pgrep swww >/dev/null 2>&1 || swww &
|
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
|
||||||
# Run the logon wallpaper script if it exists
|
serviceConfig.Type = "oneshot";
|
||||||
[ -x "${scriptFile}" ] && "${scriptFile}"
|
|
||||||
'
|
# Use a proper shell script invocation
|
||||||
'';
|
serviceConfig.ExecStart = ''
|
||||||
serviceConfig.Restart = "on-failure";
|
${pkgs.bash}/bin/bash -c '
|
||||||
};
|
mkdir -p "${wallpaperDst}"
|
||||||
|
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||||
|
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||||
|
|
||||||
|
# Start swww if not running
|
||||||
|
pgrep swww >/dev/null 2>&1 || swww &
|
||||||
|
|
||||||
|
# Run the logon wallpaper script if executable
|
||||||
|
if [ -x "${scriptFile}" ]; then
|
||||||
|
"${scriptFile}"
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# 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";
|
||||||
serviceConfig.ExecStart = ''
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
/bin/sh -c '
|
|
||||||
# Ensure destination exists
|
|
||||||
mkdir -p ${wallpaperDst}
|
|
||||||
|
|
||||||
# Copy all wallpapers
|
let
|
||||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
username = config.defaultUser or "henrov";
|
||||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
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
|
||||||
|
];
|
||||||
|
|
||||||
# Start swww daemon if not running
|
systemd.user.services.wallpaperSync = {
|
||||||
pgrep swww >/dev/null 2>&1 || swww &
|
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
|
||||||
# Run the logon wallpaper script if it exists
|
serviceConfig.Type = "oneshot";
|
||||||
[ -x "${scriptFile}" ] && "${scriptFile}"
|
|
||||||
'
|
# Use a proper shell script invocation
|
||||||
'';
|
serviceConfig.ExecStart = ''
|
||||||
serviceConfig.Restart = "on-failure";
|
${pkgs.bash}/bin/bash -c '
|
||||||
};
|
mkdir -p "${wallpaperDst}"
|
||||||
|
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||||
|
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||||
|
|
||||||
|
# Start swww if not running
|
||||||
|
pgrep swww >/dev/null 2>&1 || swww &
|
||||||
|
|
||||||
|
# Run the logon wallpaper script if executable
|
||||||
|
if [ -x "${scriptFile}" ]; then
|
||||||
|
"${scriptFile}"
|
||||||
|
fi
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Timer to run the service every 15 minutes
|
# Timer to run the service every 15 minutes
|
||||||
|
|||||||
Reference in New Issue
Block a user