2023-12-16 19:26:15 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.voidcruiser.xconfig;
|
|
|
|
in {
|
|
|
|
options.voidcruiser.xconfig = {
|
|
|
|
|
|
|
|
enable = mkEnableOption "Enables opinionated xorg config";
|
|
|
|
|
|
|
|
bqn.enable = mkEnableOption "Enables bqn layout";
|
|
|
|
|
|
|
|
touchpad.enableProperConfig = mkEnableOption "Enable the only correct touchpad settings";
|
|
|
|
|
|
|
|
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;
|
|
|
|
autoRepeatDelay = 250;
|
|
|
|
autoRepeatInterval = 30;
|
|
|
|
windowManager = {
|
|
|
|
windowmaker.enable = true;
|
|
|
|
xmonad.enable = true;
|
|
|
|
};
|
2023-12-27 13:30:49 +01:00
|
|
|
displayManager.lightdm = mkIf cfg.lightdm.enable {
|
2023-12-16 19:26:15 +01:00
|
|
|
enable = true;
|
|
|
|
greeters.gtk.enable = true;
|
|
|
|
background = cfg.displayManager.background;
|
|
|
|
};
|
|
|
|
libinput = {
|
|
|
|
mouse = {
|
|
|
|
accelProfile = cfg.mouse.accelProfile;
|
|
|
|
middleEmulation = false;
|
|
|
|
};
|
|
|
|
touchpad = mkIf cfg.touchpad.enableProperConfig {
|
|
|
|
tapping = false;
|
|
|
|
disableWhileTyping = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|