summaryrefslogtreecommitdiff
path: root/modules/gui.nix
blob: ccf1c503206a5001e5dde61d3263257d7762f3be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, pkgs, config, ... }:

{
  options = {
    this.gui.enable = lib.mkEnableOption "GUI";
    this.gui.extraPackages = lib.mkOption {
      type = with lib.types; listOf package;
      default = with pkgs; [ xorg.xmodmap xorg.xkbcomp xorg.xdpyinfo ];
    };
  };

  config = lib.mkIf config.this.gui.enable {
    services.xserver.enable = true;
    services.xserver.displayManager.startx.enable = true;
    services.speechd.enable = false;
    services.openssh.settings.X11Forwarding = true;

    environment.systemPackages = config.this.gui.extraPackages;
  };
}