Merge pull request #107086 from NixOS/staging-next

Staging next with systemd privacy fix
This commit is contained in:
Florian Klink
2020-12-23 15:32:32 +01:00
committed by GitHub
107 changed files with 1638 additions and 1009 deletions
@@ -238,6 +238,7 @@ in
kidletime
kimageformats
kinit
kirigami2 # In system profile for SDDM theme. TODO: wrapper.
kio
kjobwidgets
knewstuff
@@ -39,6 +39,18 @@ in
displayManager.lightdm.enable = lib.mkForce false;
};
systemd.services.display-manager.enable = false;
# Other displayManagers log to /dev/null because they're services and put
# Xorg's stdout in the journal
#
# To send log to Xorg's default log location ($XDG_DATA_HOME/xorg/), we do
# not specify a log file when running X
services.xserver.logFile = mkDefault null;
# Implement xserverArgs via xinit's system-wide xserverrc
environment.etc."X11/xinit/xserverrc".source = pkgs.writeShellScript "xserverrc" ''
exec ${pkgs.xorg.xorgserver}/bin/X ${toString config.services.xserver.displayManager.xserverArgs} "$@"
'';
environment.systemPackages = with pkgs; [ xorg.xinit ];
};
+14 -2
View File
@@ -518,6 +518,19 @@ in
'';
};
logFile = mkOption {
type = types.nullOr types.str;
default = "/dev/null";
example = "/var/log/Xorg.0.log";
description = ''
Controls the file Xorg logs to.
The default of <literal>/dev/null</literal> is set so that systemd services (like <literal>displayManagers</literal>) only log to the journal and don't create their own log files.
Setting this to <literal>null</literal> will not pass the <literal>-logfile</literal> argument to Xorg which allows it to log to its default logfile locations instead (see <literal>man Xorg</literal>). You probably only want this behaviour when running Xorg manually (e.g. via <literal>startx</literal>).
'';
};
verbose = mkOption {
type = types.nullOr types.int;
default = 3;
@@ -692,11 +705,10 @@ in
services.xserver.displayManager.xserverArgs =
[ "-config ${configFile}"
"-xkbdir" "${cfg.xkbDir}"
# Log at the default verbosity level to stderr rather than /var/log/X.*.log.
"-logfile" "/dev/null"
] ++ optional (cfg.display != null) ":${toString cfg.display}"
++ optional (cfg.tty != null) "vt${toString cfg.tty}"
++ optional (cfg.dpi != null) "-dpi ${toString cfg.dpi}"
++ optional (cfg.logFile != null) "-logfile ${toString cfg.logFile}"
++ optional (cfg.verbose != null) "-verbose ${toString cfg.verbose}"
++ optional (!cfg.enableTCP) "-nolisten tcp"
++ optional (cfg.autoRepeatDelay != null) "-ardelay ${toString cfg.autoRepeatDelay}"
@@ -93,7 +93,17 @@ in
(if i.useDHCP != null then i.useDHCP else false));
address = forEach (interfaceIps i)
(ip: "${ip.address}/${toString ip.prefixLength}");
networkConfig.IPv6PrivacyExtensions = "kernel";
# IPv6PrivacyExtensions=kernel seems to be broken with networkd.
# Instead of using IPv6PrivacyExtensions=kernel, configure it according to the value of
# `tempAddress`:
networkConfig.IPv6PrivacyExtensions = {
# generate temporary addresses and use them by default
"default" = true;
# generate temporary addresses but keep using the standard EUI-64 ones by default
"enabled" = "prefer-public";
# completely disable temporary addresses
"disabled" = false;
}.${i.tempAddress};
linkConfig = optionalAttrs (i.macAddress != null) {
MACAddress = i.macAddress;
} // optionalAttrs (i.mtu != null) {