mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
scroll-boost: convert to module
This commit is contained in:
parent
dcb1e17982
commit
32e0d516a6
2 changed files with 20 additions and 20 deletions
13
default.nix
13
default.nix
|
@ -4,14 +4,8 @@ let
|
||||||
cfg = config.sconfig;
|
cfg = config.sconfig;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.sconfig = {
|
options.sconfig.profile = mkOption {
|
||||||
|
type = types.enum [ "server" "desktop-gnome" "desktop-sway" ];
|
||||||
profile = mkOption {
|
|
||||||
type = types.enum [ "server" "desktop-gnome" "desktop-sway" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
scroll-boost = mkEnableOption "Patch libinput scroll speed";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
|
@ -29,14 +23,13 @@ in
|
||||||
(import ./modules/graphical.nix { inherit pkgs; })
|
(import ./modules/graphical.nix { inherit pkgs; })
|
||||||
]))
|
]))
|
||||||
|
|
||||||
(mkIf cfg.scroll-boost (import ./modules/scroll-boost { }))
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./modules/alacritty.nix
|
./modules/alacritty.nix
|
||||||
./modules/baseline.nix
|
./modules/baseline.nix
|
||||||
./modules/cli.nix
|
./modules/cli.nix
|
||||||
|
./modules/scroll-boost
|
||||||
./modules/status-on-console.nix
|
./modules/status-on-console.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,20 @@
|
||||||
{ ... }:
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.sconfig.scroll-boost;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
options.sconfig.scroll-boost = lib.mkEnableOption "Patch xf86-libinput scroll speed";
|
||||||
(self: super: {
|
|
||||||
xorg = super.xorg.overrideScope' (selfB: superB: {
|
config = lib.mkIf cfg {
|
||||||
inherit (super.xorg) xlibsWrapper;
|
nixpkgs.overlays = [
|
||||||
xf86inputlibinput = superB.xf86inputlibinput.overrideAttrs (attr: {
|
(self: super: {
|
||||||
patches = [ ./libinput.patch ];
|
xorg = super.xorg.overrideScope' (selfB: superB: {
|
||||||
|
inherit (super.xorg) xlibsWrapper;
|
||||||
|
xf86inputlibinput = superB.xf86inputlibinput.overrideAttrs (attr: {
|
||||||
|
patches = [ ./libinput.patch ];
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
})
|
];
|
||||||
];
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue