new wallpaperthingie

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