nixos-config/modules/fix-gnome-mouse-lag.nix

32 lines
834 B
Nix
Raw Normal View History

2021-03-26 03:10:03 +00:00
{ config, pkgs, lib, ... }:
let
cfg = config.sconfig.fix-gnome-mouse-lag;
in
{
2021-03-27 03:53:07 +00:00
options.sconfig.fix-gnome-mouse-lag = lib.mkOption {
default = true;
type = lib.types.bool;
description = "Reduce mouse latency on wayland";
};
2021-03-26 03:10:03 +00:00
config = lib.mkIf cfg {
nixpkgs.overlays = [
(self: super: {
gnome3 = super.gnome3 // {
gnome-shell = super.gnome3.gnome-shell.override {
mutter = super.gnome3.mutter.overrideAttrs (old: {
patches = old.patches ++ [
(pkgs.fetchurl {
url = "https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/168.patch";
sha256 = "f9e71b14c791ac7553ff4ed2d0d5b612fc886c5aa771587965a6ffd99cb98b86";
})
];
});
};
};
})
];
};
}