at 18.09-beta 1.6 kB view raw
1# This module gets rid of all dependencies on X11 client libraries 2# (including fontconfig). 3 4{ config, lib, ... }: 5 6with lib; 7 8{ 9 options = { 10 environment.noXlibs = mkOption { 11 type = types.bool; 12 default = false; 13 description = '' 14 Switch off the options in the default configuration that 15 require X11 libraries. This includes client-side font 16 configuration and SSH forwarding of X11 authentication 17 in. Thus, you probably do not want to enable this option if 18 you want to run X11 programs on this machine via SSH. 19 ''; 20 }; 21 }; 22 23 config = mkIf config.environment.noXlibs { 24 programs.ssh.setXAuthLocation = false; 25 security.pam.services.su.forwardXAuth = lib.mkForce false; 26 27 fonts.fontconfig.enable = false; 28 29 nixpkgs.overlays = singleton (const (super: { 30 dbus = super.dbus.override { x11Support = false; }; 31 networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; }; 32 networkmanager-l2tp = super.networkmanager-l2tp.override { withGnome = false; }; 33 networkmanager-openconnect = super.networkmanager-openconnect.override { withGnome = false; }; 34 networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; }; 35 networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; }; 36 networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; }; 37 pinentry = super.pinentry_ncurses; 38 gobjectIntrospection = super.gobjectIntrospection.override { x11Support = false; }; 39 })); 40 }; 41}