From 4730b215fdc4095800fedfdf690c12fec994bb6b Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Wed, 2 Oct 2024 22:07:10 -0500 Subject: more reorganizing and modularizing --- modules/root/x11/default.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/root/x11/default.nix (limited to 'modules/root/x11/default.nix') diff --git a/modules/root/x11/default.nix b/modules/root/x11/default.nix new file mode 100644 index 0000000..8fa1d27 --- /dev/null +++ b/modules/root/x11/default.nix @@ -0,0 +1,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 = [ + ./xinit-startx-xdg.patch + ]; + })) + ]; + }; +} -- cgit v1.2.3