new wallpaperthingie
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
# file: configuration.nix snippet
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -22,6 +21,7 @@ in
|
|||||||
systemd.user.services.wpaperd = {
|
systemd.user.services.wpaperd = {
|
||||||
description = "wpaperd wallpaper daemon";
|
description = "wpaperd wallpaper daemon";
|
||||||
after = [ "default.target" ];
|
after = [ "default.target" ];
|
||||||
|
enable = true; # <-- Must be set for user services
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
@@ -30,18 +30,17 @@ in
|
|||||||
RestartSec = 1;
|
RestartSec = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
install = {
|
# Optional: make it start on login (default.target)
|
||||||
WantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Optional: ensure the directory exists
|
# Optional: ensure the directory exists at activation
|
||||||
system.activationScripts.copyWallpaperConf = {
|
system.activationScripts.copyWallpaperConf = {
|
||||||
text = ''
|
text = ''
|
||||||
echo "=== Ensuring wallpaper config exists ==="
|
echo "=== Ensuring wallpaper config exists ==="
|
||||||
mkdir -p "${wallpaperDir}/pictures"
|
mkdir -p "${wallpaperDir}/pictures"
|
||||||
if [ ! -f "${wallpaperConf}" ]; then
|
if [ ! -f "${wallpaperConf}" ]; then
|
||||||
touch "${wallpaperConf}"
|
touch "${wallpaperConf}"
|
||||||
fi
|
fi
|
||||||
echo "Done."
|
echo "Done."
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user