3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/modules/config/no-x-libs.nix
Mathijs Kwik f31fefdfd9 splitted ssh/sshd X11 forwarding logic. Backward compatible change.
You can now set the forwardX11 config option for the ssh client and server separately.

For server, the option means "allow clients to request X11 forwarding".
For client, the option means "request X11 forwarding by default on all connections".

I don't think it made sense to couple them. I might not even run the server on some machines.
Also, I ssh to a lot of machines, and rarely want X11 forwarding. The times I want it,
I use the -X/-Y option, or set it in my ~/.ssh/config.

I also decoupled the 'XAuthLocation' logic from forwardX11.
For my case where ssh client doesn't want forwarding by default, it still wants to set the path for the cases I do need it.

As this flag is the one that pulls in X11 dependencies, I changed the minimal profile and the no-x-libs config to check that instead now.

svn path=/nixos/trunk/; revision=33407
2012-03-25 15:42:05 +00:00

27 lines
643 B
Nix

{pkgs, config, ...}:
{
options = {
environment.noXlibs = pkgs.lib.mkOption {
default = false;
example = true;
description = ''
Switch off the options in the default configuration that require X libraries.
Currently this includes: ssh X11 forwarding, dbus, hal, fonts.enableCoreFonts,
fonts.enableFontConfig
'';
};
};
config = pkgs.lib.mkIf config.environment.noXlibs {
programs.ssh.setXAuthLocation = false;
services = {
dbus.enable = false;
hal.enable = false;
};
fonts = {
enableCoreFonts = false;
enableFontConfig = false;
};
};
}