Regenerated
This commit is contained in:
+295
-313
File diff suppressed because it is too large
Load Diff
+7
-25
@@ -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 = {
|
||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
@@ -2387,34 +2387,14 @@ in
|
||||
after = [ "graphical-session.target" ];
|
||||
|
||||
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
|
||||
# Proper shell script invocation
|
||||
serviceConfig.ExecStart = ''
|
||||
${pkgs.bash}/bin/bash -c '
|
||||
# Ensure destination exists
|
||||
mkdir -p "${wallpaperDst}"
|
||||
|
||||
# Copy all wallpapers
|
||||
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||
|
||||
@@ -2427,6 +2407,8 @@ in
|
||||
fi
|
||||
'
|
||||
'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
|
||||
############################
|
||||
# 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 = {
|
||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
||||
@@ -27,34 +27,14 @@ in
|
||||
after = [ "graphical-session.target" ];
|
||||
|
||||
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
|
||||
# Proper shell script invocation
|
||||
serviceConfig.ExecStart = ''
|
||||
${pkgs.bash}/bin/bash -c '
|
||||
# Ensure destination exists
|
||||
mkdir -p "${wallpaperDst}"
|
||||
|
||||
# Copy all wallpapers
|
||||
rsync -avu --ignore-existing "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||
rsync -avu "${wallpaperSrc}/" "${wallpaperDst}/"
|
||||
|
||||
@@ -67,6 +47,8 @@ in
|
||||
fi
|
||||
'
|
||||
'';
|
||||
serviceConfig.Restart = "on-failure";
|
||||
};
|
||||
|
||||
############################
|
||||
# Timer to run the service every 15 minutes
|
||||
|
||||
Reference in New Issue
Block a user