blob: e2b7a8637c545af9c47d03ff58fbd65a88a32302 (
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
35
36
|
# This module configures a basic graphical environment. I use this sometimes for
# ahmed when muhammed is being repaired.
{ config, lib, pkgs, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.modules.graphics;
in
{
options.my.modules.graphics.enable = mkEnableOption "basic graphical environment";
config = mkIf cfg.enable {
services.xserver.enable = true;
# Match console keyboard layout but swap capslock and escape.
# TODO: Create a custom keymap with esc/capslock swap so console can use it.
services.xserver.layout = config.console.keyMap;
services.xserver.xkbOptions = "caps:swapescape";
# Enable touchpad support.
services.xserver.libinput.enable = true;
services.xserver.windowManager.dwm.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [
st # suckless terminal - dwm is pretty sucky without this
dmenu # application launcher
];
};
}
|