2023-12-16 19:26:15 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib;
|
2024-02-17 18:49:37 +01:00
|
|
|
let cfg = config.voidconf.xconfig;
|
2023-12-16 19:26:15 +01:00
|
|
|
in {
|
2024-02-17 18:49:37 +01:00
|
|
|
options.voidconf.xconfig = {
|
2023-12-16 19:26:15 +01:00
|
|
|
|
|
|
|
enable = mkEnableOption "Enables opinionated xorg config";
|
|
|
|
|
2024-05-20 11:13:43 +02:00
|
|
|
enableKeyRepeatSettings = mkEnableOption "Enables insanely fast keyrepeat";
|
|
|
|
|
2023-12-16 19:26:15 +01:00
|
|
|
bqn.enable = mkEnableOption "Enables bqn layout";
|
|
|
|
|
2024-01-03 13:59:25 +01:00
|
|
|
touchpad = {
|
|
|
|
enableProperConfig = mkEnableOption "Enable the only correct touchpad settings";
|
|
|
|
|
|
|
|
accelProfile = mkOption {
|
|
|
|
type = types.enum [ "flat" "adaptive" ];
|
|
|
|
default = "adaptive";
|
|
|
|
example = "flat";
|
|
|
|
description = ''
|
|
|
|
Usually want this on adaptive.
|
2024-05-20 11:13:43 +02:00
|
|
|
'';
|
2024-01-03 13:59:25 +01:00
|
|
|
};
|
2023-12-16 19:26:15 +01:00
|
|
|
|
2024-01-01 17:59:39 +01:00
|
|
|
};
|
|
|
|
|
2023-12-16 19:26:15 +01:00
|
|
|
mouse.accelProfile = mkOption {
|
|
|
|
type = types.enum [ "flat" "adaptive" ];
|
|
|
|
default = "flat";
|
|
|
|
example = "adaptive";
|
|
|
|
description = ''
|
|
|
|
Use addaptive on trackball and touchpad; and flat on any normal mouse.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2023-12-27 13:30:49 +01:00
|
|
|
lightdm.enable = mkEnableOption "Enables the LightDM display manager and config";
|
2023-12-27 13:17:57 +01:00
|
|
|
lightdm.background = mkOption {
|
2023-12-16 19:26:15 +01:00
|
|
|
default = ./images/city.png;
|
|
|
|
type = types.path;
|
|
|
|
description = ''
|
|
|
|
Display manager background.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
|
|
|
services.xserver = {
|
|
|
|
|
|
|
|
extraLayouts.bqn = mkIf cfg.bqn.enable {
|
|
|
|
description = "BQN layout";
|
|
|
|
languages = [ "bqn" ];
|
|
|
|
symbolsFile = ./misc/bqn;
|
|
|
|
};
|
|
|
|
layout = (if cfg.bqn.enable then "us,bqn" else "us");
|
|
|
|
xkbOptions = mkIf cfg.bqn.enable "grp:switch";
|
|
|
|
|
|
|
|
enable = true;
|
2024-05-20 11:13:43 +02:00
|
|
|
autoRepeatDelay = mkIf cfg.enableKeyRepeatSettings 200;
|
|
|
|
autoRepeatInterval = mkIf cfg.enableKeyRepeatSettings 60;
|
2023-12-16 19:26:15 +01:00
|
|
|
windowManager = {
|
|
|
|
windowmaker.enable = true;
|
|
|
|
xmonad.enable = true;
|
|
|
|
};
|
2023-12-27 14:45:39 +01:00
|
|
|
displayManager.lightdm = {
|
|
|
|
enable = cfg.lightdm.enable;
|
2023-12-16 19:26:15 +01:00
|
|
|
greeters.gtk.enable = true;
|
2023-12-27 14:45:39 +01:00
|
|
|
background = cfg.lightdm.background;
|
2023-12-16 19:26:15 +01:00
|
|
|
};
|
|
|
|
libinput = {
|
|
|
|
mouse = {
|
|
|
|
accelProfile = cfg.mouse.accelProfile;
|
|
|
|
middleEmulation = false;
|
|
|
|
};
|
|
|
|
touchpad = mkIf cfg.touchpad.enableProperConfig {
|
|
|
|
tapping = false;
|
|
|
|
disableWhileTyping = true;
|
2024-01-03 14:08:05 +01:00
|
|
|
accelProfile = cfg.touchpad.accelProfile;
|
2023-12-16 19:26:15 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|