new wallpaperthingie

This commit is contained in:
2026-03-17 18:10:48 +00:00
parent 9681c32e1e
commit 38d3a28232
@@ -8,38 +8,32 @@
}:
let
script_path = "${flakeRoot}/assets/hyprland/scripts/copy_wallpaperstuff.sh";
wallpaper_conf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
cfg = config.wallpaper;
sourceDir = "${flakeRoot}/assets/hyprland/wallpaperstuff";
in
{
options.wallpaper.enable = lib.mkEnableOption "Wallpaper setup";
config = lib.mkIf config.wallpaper.enable {
config = lib.mkIf cfg.enable {
home-manager.users.${user.username} = {
# Install wpaperd
home.packages = with pkgs; [ wpaperd ];
home.packages = with pkgs; [
wpaperd
];
# Make script available in home
home.file."copy_wallpaperstuff.sh" = {
source = script_path;
executable = true;
#
# 🔥 Copy entire wallpaper directory into HOME
#
home.file."Droidnix/wallpaperstuff" = {
source = sourceDir;
recursive = true;
};
# Activation script
home.activation.copy-wallpapers = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
echo "=== Activation Script Running ==="
if [ -f "$HOME/copy_wallpaperstuff.sh" ]; then
echo "Executing wallpaper script..."
"$HOME/copy_wallpaperstuff.sh"
else
echo "ERROR: Script not found in home"
fi
'';
# wpaperd config
xdg.configFile."wpaperd/config.toml".text = builtins.readFile wallpaper_conf;
#
# 🔥 wpaperd config
#
xdg.configFile."wpaperd/config.toml".source = "${sourceDir}/wallpaper.conf";
};
};
}