Regenerated
This commit is contained in:
+297
-299
File diff suppressed because it is too large
Load Diff
+9
-11
@@ -2361,11 +2361,11 @@ 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.users.users."traveldroid".name or "traveldroid";
|
||||||
homeDir = "/home/${username}";
|
homeDir = "/home/${username}";
|
||||||
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
||||||
wallpaperDst = "${homeDir}/Wallpapers";
|
wallpaperDst = "${homeDir}/Wallpapers";
|
||||||
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
|
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
############################
|
############################
|
||||||
@@ -2379,24 +2379,22 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Ensure swww daemon runs
|
# User systemd service to start swww, sync wallpapers, and run the script
|
||||||
############################
|
|
||||||
services.swww.enable = true;
|
|
||||||
|
|
||||||
############################
|
|
||||||
# User systemd service to sync wallpapers and run script
|
|
||||||
############################
|
############################
|
||||||
systemd.user.services.wallpaperSync = {
|
systemd.user.services.wallpaperSync = {
|
||||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
description = "Start swww, 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
|
||||||
|
pgrep swww >/dev/null 2>&1 || swww &
|
||||||
|
|
||||||
# Ensure destination exists
|
# Ensure destination exists
|
||||||
mkdir -p ${wallpaperDst}
|
mkdir -p ${wallpaperDst}
|
||||||
|
|
||||||
# Copy wallpapers: overwrite newer files, do not delete existing files
|
# Copy wallpapers: overwrite newer files, do not delete existing
|
||||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{ config, pkgs, lib, flakeRoot, ... }:
|
{ config, pkgs, lib, flakeRoot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
username = config.users.users."traveldroid".name or "traveldroid";
|
username = config.users.users."traveldroid".name or "traveldroid";
|
||||||
homeDir = "/home/${username}";
|
homeDir = "/home/${username}";
|
||||||
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
wallpaperSrc = "${flakeRoot}/assets/Wallpapers";
|
||||||
wallpaperDst = "${homeDir}/Wallpapers";
|
wallpaperDst = "${homeDir}/Wallpapers";
|
||||||
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
|
scriptFile = "${wallpaperDst}/set-wallpapers-at-logon.sh";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
############################
|
############################
|
||||||
@@ -19,24 +19,22 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# Ensure swww daemon runs
|
# User systemd service to start swww, sync wallpapers, and run the script
|
||||||
############################
|
|
||||||
services.swww.enable = true;
|
|
||||||
|
|
||||||
############################
|
|
||||||
# User systemd service to sync wallpapers and run script
|
|
||||||
############################
|
############################
|
||||||
systemd.user.services.wallpaperSync = {
|
systemd.user.services.wallpaperSync = {
|
||||||
description = "Sync Wallpapers and run set-wallpapers-at-logon.sh";
|
description = "Start swww, 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
|
||||||
|
pgrep swww >/dev/null 2>&1 || swww &
|
||||||
|
|
||||||
# Ensure destination exists
|
# Ensure destination exists
|
||||||
mkdir -p ${wallpaperDst}
|
mkdir -p ${wallpaperDst}
|
||||||
|
|
||||||
# Copy wallpapers: overwrite newer files, do not delete existing files
|
# Copy wallpapers: overwrite newer files, do not delete existing
|
||||||
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
rsync -au --ignore-existing ${wallpaperSrc}/ ${wallpaperDst}/
|
||||||
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
rsync -au ${wallpaperSrc}/ ${wallpaperDst}/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user