about summary refs log tree commit diff
path: root/nixos/modules/config/no-x-libs.nix
blob: ec7bf3fea7b5c9e08605a8a2eada43f98f934e8c (plain) (blame)
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
{ config, pkgs, ... }:

with pkgs.lib;

{
  options = {
    environment.noXlibs = mkOption {
      type = types.bool;
      default = false;
      description = ''
        Switch off the options in the default configuration that require X libraries.
        Currently this includes: ssh X11 forwarding, dbus, fonts.enableCoreFonts,
        fonts.enableFontConfig
      '';
    };
  };

  config = mkIf config.environment.noXlibs {
    programs.ssh.setXAuthLocation = false;
    fonts = {
      enableCoreFonts = false;
      enableFontConfig = false;
    };
  };
}