no-x-libs.nix: Disable su xauth forwarding, and X11 dependency in dbus
This commit is contained in:
parent
c13d582c78
commit
150d3b0095
|
@ -58,7 +58,7 @@ rec {
|
||||||
inherit system extraArgs modules prefix;
|
inherit system extraArgs modules prefix;
|
||||||
# For efficiency, leave out most NixOS modules; they don't
|
# For efficiency, leave out most NixOS modules; they don't
|
||||||
# define nixpkgs.config, so it's pointless to evaluate them.
|
# define nixpkgs.config, so it's pointless to evaluate them.
|
||||||
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
baseModules = [ ../modules/misc/nixpkgs.nix ../modules/config/no-x-libs.nix ];
|
||||||
pkgs = import ./nixpkgs.nix { system = system_; config = {}; };
|
pkgs = import ./nixpkgs.nix { system = system_; config = {}; };
|
||||||
check = false;
|
check = false;
|
||||||
}).config.nixpkgs;
|
}).config.nixpkgs;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
# This module gets rid of all dependencies on X11 client libraries
|
||||||
|
# (including fontconfig).
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -8,18 +11,22 @@ with lib;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Switch off the options in the default configuration that require X libraries.
|
Switch off the options in the default configuration that
|
||||||
Currently this includes: ssh X11 forwarding, dbus, fonts.enableCoreFonts,
|
require X11 libraries. This includes client-side font
|
||||||
fonts.enableFontConfig
|
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 {
|
config = mkIf config.environment.noXlibs {
|
||||||
programs.ssh.setXAuthLocation = false;
|
programs.ssh.setXAuthLocation = false;
|
||||||
fonts = {
|
security.pam.services.su.forwardXAuth = lib.mkForce false;
|
||||||
enableCoreFonts = false;
|
|
||||||
enableFontConfig = false;
|
fonts.enableFontConfig = false;
|
||||||
};
|
|
||||||
|
nixpkgs.config.packageOverrides = pkgs:
|
||||||
|
{ dbus = pkgs.dbus.override { useX11 = false; }; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
# This module defines a small NixOS configuration. It does not
|
# This module defines a small NixOS configuration. It does not
|
||||||
# contain any graphical stuff.
|
# contain any graphical stuff.
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Don't include X libraries.
|
environment.noXlibs = true;
|
||||||
programs.ssh.setXAuthLocation = false;
|
|
||||||
fonts.enableFontConfig = false;
|
|
||||||
fonts.enableCoreFonts = false;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue