diff --git a/lib/pkgs/default.nix b/lib/pkgs/default.nix index 496a3660..4d4fff36 100644 --- a/lib/pkgs/default.nix +++ b/lib/pkgs/default.nix @@ -4,7 +4,7 @@ }: let inherit (builtins) readFile fromJSON; inherit (self.lib) mkVersion; - inherit (pkgs.lib) elemAt hasAttr length map optionalString toLower; + inherit (pkgs.lib) concatStringsSep elemAt hasAttr length map optionalString toLower; in { buildPlugin = pname: src: pkgs.vimUtils.buildVimPlugin { @@ -33,9 +33,10 @@ in { pname, }: let girNameTable = { - gtk4 = "Gtk-4.0"; - gtk-session-lock = "GtkSessionLock-0.1"; - libadwaita = "Adw-1"; + gtk4 = ["Gtk-4.0"]; + gtk4-layer-shell = ["Gtk4LayerShell-1.0" "Gtk4SessionLock-1.0"]; + gtk-session-lock = ["GtkSessionLock-0.1"]; + libadwaita = ["Adw-1"]; }; withGirNames = @@ -46,7 +47,7 @@ in { package.girName or ( if hasAttr package.pname girNameTable - then girNameTable.${package.pname} + then concatStringsSep " " girNameTable.${package.pname} else throw "girName of ${package.name} couldn't be found" ); }) diff --git a/modules/ags/default.nix b/modules/ags/default.nix index 3e90962b..73fe51cc 100644 --- a/modules/ags/default.nix +++ b/modules/ags/default.nix @@ -52,6 +52,19 @@ in { security.pam.services.astal-auth = {}; services.upower.enable = true; + nixpkgs.overlays = [ + (final: prev: { + gtk4-layer-shell = prev.gtk4-layer-shell.overrideAttrs (o: { + src = pkgs.fetchFromGitHub { + owner = "wmww"; + repo = "gtk4-layer-shell"; + rev = "e6c958189fcb78894d86db5beead1526084f8755"; + hash = "sha256-QwOzgOJuf8K7v/aTDNw+hYRNa8TIel3Pac/cwCMU8zw="; + }; + }); + }) + ]; + i18n.inputMethod = mkIf cfgDesktop.isTouchscreen { enable = true; type = "fcitx5"; diff --git a/modules/ags/packages.nix b/modules/ags/packages.nix index fef794c3..244d1c16 100644 --- a/modules/ags/packages.nix +++ b/modules/ags/packages.nix @@ -32,7 +32,11 @@ in { programs.ags = { package = ags.packages.${pkgs.system}.ags.override { extraPackages = cfg.astalLibs; + + # Make sure we use my overlayed version for gtk4-session-lock + gtk4-layer-shell = pkgs.gtk4-layer-shell; }; + astalLibs = attrValues { inherit (astal.packages.${pkgs.system}) @@ -66,6 +70,7 @@ in { inherit (pkgs) libadwaita + gtk4-layer-shell gtk4 # Needed to build types ; }; @@ -129,7 +134,11 @@ in { pname = "ags"; configPath = "${cfg.configDir}/@girs"; packages = filter (x: - x.pname != "libadwaita" && x.pname != "libkompass") + true + && x.pname != "libadwaita" + && x.pname != "libkompass" + && x.pname != "gtk4-layer-shell" + && x.pname != "gtk4-session-lock") cfg.astalLibs; }) // (buildGirTypes {