diff options
Diffstat (limited to 'nixos/modules/config/no-x-libs.nix')
-rw-r--r-- | nixos/modules/config/no-x-libs.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/nixos/modules/config/no-x-libs.nix b/nixos/modules/config/no-x-libs.nix index 4b791c109d7..f91dbb4cc28 100644 --- a/nixos/modules/config/no-x-libs.nix +++ b/nixos/modules/config/no-x-libs.nix @@ -1,3 +1,6 @@ +# This module gets rid of all dependencies on X11 client libraries +# (including fontconfig). + { config, lib, pkgs, ... }: with lib; @@ -8,18 +11,22 @@ with lib; 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 + Switch off the options in the default configuration that + require X11 libraries. This includes client-side font + configuration and SSH forwarding of X11 authentication + in. Thus, you probably do not want to enable this option if + you want to run X11 programs on this machine via SSH. ''; }; }; config = mkIf config.environment.noXlibs { programs.ssh.setXAuthLocation = false; - fonts = { - enableCoreFonts = false; - enableFontConfig = false; - }; + security.pam.services.su.forwardXAuth = lib.mkForce false; + + fonts.enableFontConfig = false; + + nixpkgs.config.packageOverrides = pkgs: + { dbus = pkgs.dbus.override { useX11 = false; }; }; }; } |