diff --git a/apps/hyprpaper/default.nix b/apps/hyprpaper/default.nix index aaaf89f..3eb0e5e 100644 --- a/apps/hyprpaper/default.nix +++ b/apps/hyprpaper/default.nix @@ -8,7 +8,7 @@ # TODO: rewrite wallpaperDir = "${config.home.homeDirectory}/.config/nixos/assets/Wallpapers"; defaultWallpaper = "${wallpaperDir}/${myConfig.hyprland.wallpaper}"; - cacheWallpaper = "${config.home.homeDirectory}/.local/state/current_wallpaper"; + cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper"; switch-wallpaper = pkgs.writeShellScriptBin "hakase-wallpaper-switch" '' if [[ "$1" != "run" ]]; then @@ -70,6 +70,8 @@ in { wayland.windowManager.hyprland.settings = { exec-once = [ # "uwsm app -- hyprpaper" + "hyprctl hyprpaper preload ${cacheWallpaper}" + "hyprctl hyprpaper wallpaper ,${cacheWallpaper}" "uwsm app -- matugen image ${cacheWallpaper} --source-color-index 0" ]; diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index 097fa9e..7dd6031 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -1,12 +1,14 @@ { + inputs, myConfig, pkgs, ... }: { programs.hyprland = { enable = true; - # Use nixpkgs Hyprland for ABI compatibility with plugins withUWSM = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; }; environment.systemPackages = [ @@ -32,4 +34,4 @@ environment.sessionVariables = { GTK_USE_PORTAL = "1"; }; -} \ No newline at end of file +}