new wallpaperthingie

This commit is contained in:
2026-03-17 18:14:12 +00:00
parent 38d3a28232
commit dddc63b587
@@ -11,6 +11,7 @@ let
cfg = config.wallpaper;
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
targetDir = "/home/${user.username}/Droidnix/wallpaperstuff";
in
{
options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
@@ -18,22 +19,33 @@ in
config = lib.mkIf cfg.enable {
home-manager.users.${user.username} = {
#
# ✅ Install wpaperd
#
home.packages = with pkgs; [
wpaperd
];
#
# 🔥 Copy entire wallpaper directory into HOME
#
home.file."Droidnix/wallpaperstuff" = {
source = sourceDir;
recursive = true;
};
#
# 🔥 wpaperd config
# ✅ Ensure config exists
#
xdg.configFile."wpaperd/config.toml".source = "${sourceDir}/wallpaper.conf";
#
# 🔥 One-time (non-destructive) copy
#
home.activation.setupWallpapers = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
echo "=== Wallpaper setup ==="
mkdir -p "${targetDir}"
if [ ! -d "${targetDir}/pictures" ]; then
echo "Initializing wallpaper directory..."
cp -r ${sourceDir}/* "${targetDir}/"
else
echo "Wallpaper directory already exists, skipping copy"
fi
'';
};
};
}