Regenerated
This commit is contained in:
+321
-289
File diff suppressed because it is too large
Load Diff
+33
-1
@@ -2365,10 +2365,11 @@ let
|
|||||||
homeDir = "/home/${username}";
|
homeDir = "/home/${username}";
|
||||||
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
|
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
|
||||||
wallpaperDst = "${homeDir}/Wallpapers";
|
wallpaperDst = "${homeDir}/Wallpapers";
|
||||||
|
scriptFile = "${homeDir}/Wallpapers/scripts/set-wallpapers-at-logon.sh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Make bash available
|
# Make bash available
|
||||||
environment.systemPackages = [ pkgs.bash ];
|
environment.systemPackages = [ pkgs.bash pkgs.rsync pkgs.jq ];
|
||||||
|
|
||||||
# Create the copy script using Home Manager, following Waybar style
|
# Create the copy script using Home Manager, following Waybar style
|
||||||
home-manager.users = {
|
home-manager.users = {
|
||||||
@@ -2416,6 +2417,37 @@ in
|
|||||||
|
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
############################
|
||||||
|
# User service to run wallpaper script
|
||||||
|
############################
|
||||||
|
systemd.user.services.wallpaperAtLogon = {
|
||||||
|
description = "Run wallpaper logon script";
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = scriptFile;
|
||||||
|
Restart = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Timer to run the script at login and every 15 minutes
|
||||||
|
############################
|
||||||
|
systemd.user.timers.wallpaperAtLogonTimer = {
|
||||||
|
description = "Run wallpaper script at login and every 15 minutes";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1min"; # run 1 minute after login
|
||||||
|
OnUnitActiveSec = "15min"; # repeat every 15 minutes
|
||||||
|
Persistent = true; # catch up missed runs
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,11 @@ let
|
|||||||
homeDir = "/home/${username}";
|
homeDir = "/home/${username}";
|
||||||
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
|
wallpaperSrc = "${flakeRoot}/assets/traveldroid/Wallpapers";
|
||||||
wallpaperDst = "${homeDir}/Wallpapers";
|
wallpaperDst = "${homeDir}/Wallpapers";
|
||||||
|
scriptFile = "${homeDir}/Wallpapers/scripts/set-wallpapers-at-logon.sh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Make bash available
|
# Make bash available
|
||||||
environment.systemPackages = [ pkgs.bash ];
|
environment.systemPackages = [ pkgs.bash pkgs.rsync pkgs.jq ];
|
||||||
|
|
||||||
# Create the copy script using Home Manager, following Waybar style
|
# Create the copy script using Home Manager, following Waybar style
|
||||||
home-manager.users = {
|
home-manager.users = {
|
||||||
@@ -56,4 +57,35 @@ in
|
|||||||
|
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
############################
|
||||||
|
# User service to run wallpaper script
|
||||||
|
############################
|
||||||
|
systemd.user.services.wallpaperAtLogon = {
|
||||||
|
description = "Run wallpaper logon script";
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
wants = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = scriptFile;
|
||||||
|
Restart = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Timer to run the script at login and every 15 minutes
|
||||||
|
############################
|
||||||
|
systemd.user.timers.wallpaperAtLogonTimer = {
|
||||||
|
description = "Run wallpaper script at login and every 15 minutes";
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
|
||||||
|
timerConfig = {
|
||||||
|
OnBootSec = "1min"; # run 1 minute after login
|
||||||
|
OnUnitActiveSec = "15min"; # repeat every 15 minutes
|
||||||
|
Persistent = true; # catch up missed runs
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user