69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
|
{ 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.
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
displayManager.background = mkOption {
|
||
|
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;
|
||
|
};
|
||
|
displayManager.lightdm = {
|
||
|
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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|