summaryrefslogtreecommitdiff
path: root/modules/root/x11.nix
blob: fd15c5290051c2ffc373a3c97285873cb315b496 (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
{ pkgs, lib, config, ... }: {
	options = {
		xserver.enable = lib.mkEnableOption "enables xserver";
	};

	config = lib.mkIf config.xserver.enable {
		services.xserver.enable = true;
		services.xserver.displayManager.startx.enable = true;
		services.libinput.enable = true;  # Enable touchpad support

		environment.systemPackages = with pkgs; [
			unclutter
			xcape
			xclip
			xdotool
			xorg.setxkbmap
			xorg.xinput
			xorg.xkill
			xorg.xrandr
			xorg.xset
			xwallpaper
			# Patch startx to be compliant with xdg base dir spec
			(xorg.xinit.overrideAttrs (old: rec {
				patches = [
					./resources/x11/xinit-startx-xdg.patch
				];
			}))
		];
	};
}