diff --git a/assets/wallpaper.png b/assets/wallpaper.png new file mode 100644 index 0000000..62aa705 Binary files /dev/null and b/assets/wallpaper.png differ diff --git a/hosts/common-config.nix b/hosts/common-config.nix index 4ef58d2..6f83edf 100644 --- a/hosts/common-config.nix +++ b/hosts/common-config.nix @@ -175,7 +175,10 @@ # Enable home manager home-manager = { - extraSpecialArgs = { inherit inputs; }; + extraSpecialArgs = { + inherit inputs; + assets = assets; + }; users = { "javi" = { imports = [ diff --git a/modules/home/hyprland/hyprpaper.nix b/modules/home/hyprland/hyprpaper.nix index e655de9..68c0ca4 100644 --- a/modules/home/hyprland/hyprpaper.nix +++ b/modules/home/hyprland/hyprpaper.nix @@ -2,28 +2,27 @@ config, pkgs, inputs, + assets, ... }: -let - basePath = "/home/javi/Documents/wallpapers"; - wallpaper = "Fantasy-Mountain.png"; -in { home.packages = [ pkgs.hyprpaper ]; + # Home Manager + xdg.configFile."wallpaper.png".source = "${assets}/wallpaper.png"; services.hyprpaper = { enable = true; settings = { ipc = "on"; splash = false; preload = [ - "${basePath}/${wallpaper}" + "/home/javi/.config/wallpaper.png" ]; wallpaper = [ - ", ${basePath}/${wallpaper}" + ", /home/javi/.config/wallpaper.png" ]; }; };