From 4c28b443517c996dba0675993ab1757afd169eeb Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Mon, 12 Feb 2024 13:27:05 +0800 Subject: [PATCH] overlays: fine grain patches --- nixos/profiles/common/core/default.nix | 7 ++++--- overlays/default.nix | 13 ++++++++++--- overlays/{nautilus.nix => nautilus/typeahead.nix} | 0 .../offline-mode.nix} | 0 overlays/{sway.nix => sway/input-method-popup.nix} | 7 ------- overlays/sway/tray-dbus-menu.nix | 10 ++++++++++ 6 files changed, 24 insertions(+), 13 deletions(-) rename overlays/{nautilus.nix => nautilus/typeahead.nix} (100%) rename overlays/{prismlauncher.nix => prismlauncher/offline-mode.nix} (100%) rename overlays/{sway.nix => sway/input-method-popup.nix} (66%) create mode 100644 overlays/sway/tray-dbus-menu.nix diff --git a/nixos/profiles/common/core/default.nix b/nixos/profiles/common/core/default.nix index 17f8225..86afaa2 100644 --- a/nixos/profiles/common/core/default.nix +++ b/nixos/profiles/common/core/default.nix @@ -21,9 +21,10 @@ ]; nixpkgs.overlays = [ - inputs.self.overlays.sway - inputs.self.overlays.prismlauncher - inputs.self.overlays.nautilus + inputs.self.overlays.nautilus.typeahead + inputs.self.overlays.prismlauncher.offline-mode + inputs.self.overlays.sway.input-method-popup + inputs.self.overlays.sway.tray-dbus-menu ]; ### home-manager diff --git a/overlays/default.nix b/overlays/default.nix index 6d39ff6..01f7bc1 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -4,7 +4,14 @@ let patches = (old.patches or []) ++ patches; }); in { - nautilus = import ./nautilus.nix {inherit addPatches;}; - prismlauncher = import ./prismlauncher.nix {inherit addPatches;}; - sway = import ./sway.nix {inherit addPatches;}; + nautilus = { + typeahead = import ./nautilus/typeahead.nix {inherit addPatches;}; + }; + prismlauncher = { + offline-mode = import ./prismlauncher/offline-mode.nix {inherit addPatches;}; + }; + sway = { + input-method-popup = import ./sway/input-method-popup.nix {inherit addPatches;}; + tray-dbus-menu = import ./sway/tray-dbus-menu.nix {inherit addPatches;}; + }; } diff --git a/overlays/nautilus.nix b/overlays/nautilus/typeahead.nix similarity index 100% rename from overlays/nautilus.nix rename to overlays/nautilus/typeahead.nix diff --git a/overlays/prismlauncher.nix b/overlays/prismlauncher/offline-mode.nix similarity index 100% rename from overlays/prismlauncher.nix rename to overlays/prismlauncher/offline-mode.nix diff --git a/overlays/sway.nix b/overlays/sway/input-method-popup.nix similarity index 66% rename from overlays/sway.nix rename to overlays/sway/input-method-popup.nix index dfdd240..c814598 100644 --- a/overlays/sway.nix +++ b/overlays/sway/input-method-popup.nix @@ -8,12 +8,5 @@ hash = "sha256-nd+Z6A7GE5Go7QxXOI+hiLWQiXegsQatcNfxEsXgamI="; }} | sed "s/int surface_x, surface_y, surface_width, surface_height;/int surface_x, surface_y, surface_width, surface_height = 0;/g" > $out '') - - # text_input: Implement input-method popups - # https://github.com/swaywm/sway/pull/7226 - (prev.fetchpatch { - url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch"; - hash = "sha256-LsCoK60FKp3d8qopGtrbCFXofxHT+kOv1e1PiLSyvsA="; - }) ]; } diff --git a/overlays/sway/tray-dbus-menu.nix b/overlays/sway/tray-dbus-menu.nix new file mode 100644 index 0000000..b0799b6 --- /dev/null +++ b/overlays/sway/tray-dbus-menu.nix @@ -0,0 +1,10 @@ +{addPatches, ...}: _final: prev: { + sway-unwrapped = addPatches prev.sway-unwrapped [ + # text_input: Implement input-method popups + # https://github.com/swaywm/sway/pull/7226 + (prev.fetchpatch { + url = "https://github.com/swaywm/sway/commit/d1c6e44886d1047b3aa6ff6aaac383eadd72f36a.patch"; + hash = "sha256-LsCoK60FKp3d8qopGtrbCFXofxHT+kOv1e1PiLSyvsA="; + }) + ]; +}