From a1588480a0b74daaf54f22cc45c2d9d4ce5375e3 Mon Sep 17 00:00:00 2001 From: geri1701 Date: Tue, 3 Jun 2025 11:13:36 +0200 Subject: [PATCH 1/2] Fix: Export glib-networking modules (closes #982) --- flake.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 0446673..9c438a1 100644 --- a/flake.nix +++ b/flake.nix @@ -99,15 +99,17 @@ ninja ]; shellHook = '' - if [ "''${PWD##*/}" = "HyprPanel" ]; then - echo "do you want to initialise stuff in order for tsserver to work? (y/anything_else)" - read consent - if [ "$consent" = "y" ]; then - ags types -d .; mkdir node_modules; ln -s ${astal.packages.${system}.gjs}/share/astal/gjs ./node_modules/astal + # Exporting glib-networking modules + export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules" + if [ "''${PWD##*/}" = "HyprPanel" ]; then + echo "do you want to initialise stuff in order for tsserver to work? (y/anything_else)" + read consent + if [ "$consent" = "y" ]; then + ags types -d .; mkdir node_modules; ln -s ${astal.packages.${system}.gjs}/share/astal/gjs ./node_modules/astal + fi + else + echo "you're not in HyprPanel root dir, no initialisation for you" fi - else - echo "you're not in HyprPanel root dir, no initialisation for you" - fi ''; }; } @@ -129,10 +131,12 @@ }; # Make a wrapper package to avoid overlay wrapper = pkgs.writeShellScriptBin "hyprpanel" '' + # Exporting glib-networking modules + export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules" if [ "$#" -eq 0 ]; then exec ${self.packages.${pkgs.stdenv.system}.default}/bin/hyprpanel else - exec ${ags.packages.${pkgs.stdenv.system}.io}/bin/astal -i hyprpanel "$*" + exec ${ags.packages.${pkgs.stdenv.system}.io}/bin/astal -i hyprpanel "$@" fi ''; } @@ -144,7 +148,7 @@ if [ "$#" -eq 0 ]; then exec ${self.packages.${final.stdenv.system}.default}/bin/hyprpanel else - exec ${ags.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$*" + exec ${ags.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$@" fi ''; }; From 06661b3d304b050bd51f5d657836b3ff328f73aa Mon Sep 17 00:00:00 2001 From: orangc Date: Tue, 3 Jun 2025 17:45:39 +0300 Subject: [PATCH 2/2] silly --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 9c438a1..665ec3f 100644 --- a/flake.nix +++ b/flake.nix @@ -102,13 +102,13 @@ # Exporting glib-networking modules export GIO_EXTRA_MODULES="${pkgs.glib-networking}/lib/gio/modules" if [ "''${PWD##*/}" = "HyprPanel" ]; then - echo "do you want to initialise stuff in order for tsserver to work? (y/anything_else)" + echo "Initialise dependencies required in order for tsserver to work? (y/anything_else)" read consent if [ "$consent" = "y" ]; then ags types -d .; mkdir node_modules; ln -s ${astal.packages.${system}.gjs}/share/astal/gjs ./node_modules/astal fi else - echo "you're not in HyprPanel root dir, no initialisation for you" + echo "You're not in the HyprPanel root directory, initialisation failed" fi ''; };