Initial commit
This commit is contained in:
commit
a43b5a6a1a
12 changed files with 550 additions and 0 deletions
68
modules/xconfig.nix
Normal file
68
modules/xconfig.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue