blob: 050c9d458a81f0a5d032b94a4719f1f7408fbec5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
{ pkgs, lib, config, ... }: let
cfg = config._archetypes.collections.desktop.xserver;
in {
options._archetypes.collections.desktop.xserver = {
enable = lib.mkEnableOption "installs xserver";
utilities.enable = lib.mkEnableOption "installs basic xserver utilities";
};
config = lib.mkIf cfg.enable {
services = {
xserver = {
enable = true;
displayManager.startx.enable = true;
enableTearFree = true;
};
libinput.enable = true; # Enable touchpad support
};
# Install basic X utilities
environment.systemPackages = with pkgs; lib.optionals cfg.utilities.enable [
unclutter-desktop-entry
unclutter-xfixes
xcape
xclip
xdotool
xorg.setxkbmap
xorg.xinput
xorg.xkill
xorg.xrandr
xorg.xset
xwallpaper
];
};
}
|