new wallpaperthingie

This commit is contained in:
2026-03-17 18:20:22 +00:00
parent 73f5f40871
commit 2ad4dd041a
@@ -2,24 +2,27 @@
lib,
config,
flakeRoot,
user,
pkgs,
...
}:
let
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
targetDir = "/home/${user.username}/Droidnix/wallpaperstuff";
targetDir = "${config.home.homeDirectory}/Droidnix/wallpaperstuff";
in
{
config = {
home-manager.users.${user.username}.home.activation.copyWallpapers =
lib.hm.dag.entryAfter [ "writeBoundary" ]
''
echo "Copying wallpapers..."
options = {
wallpaper.enable = lib.mkEnableOption "Copy wallpaper stuff";
};
config = lib.mkIf config.wallpaper.enable {
home-manager.users.${config.home.username}.home.activation.copyWallpapers = {
description = "Copy wallpaperstuff to ~/Droidnix/wallpaperstuff";
script = ''
echo "Copying wallpapers..."
mkdir -p "${targetDir}"
# Only copy if empty (so user can manage files later)
# Only copy if empty, so user can manage files later
if [ -z "$(ls -A "${targetDir}" 2>/dev/null)" ]; then
cp -r ${sourceDir}/* "${targetDir}/"
echo "Wallpapers copied."
@@ -28,4 +31,5 @@ in
fi
'';
};
};
}