forked from mirrors/nixpkgs
Don't set $TZ
We don't need to set $TZ, because we have /etc/localtime. In fact, setting $TZ without $TZDIR doesn't work anymore since Glibc no longer contains zone info.
This commit is contained in:
parent
fa0f5bf72f
commit
945849b86f
|
@ -6,7 +6,7 @@ with pkgs.lib;
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
time = {
|
time = {
|
||||||
|
|
||||||
timeZone = mkOption {
|
timeZone = mkOption {
|
||||||
default = "CET";
|
default = "CET";
|
||||||
type = with types; uniq string;
|
type = with types; uniq string;
|
||||||
|
@ -18,7 +18,7 @@ with pkgs.lib;
|
||||||
default = false;
|
default = false;
|
||||||
description = "If set, keep the hardware clock in local time instead of UTC.";
|
description = "If set, keep the hardware clock in local time instead of UTC.";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ with pkgs.lib;
|
||||||
|
|
||||||
environment.shellInit =
|
environment.shellInit =
|
||||||
''
|
''
|
||||||
export TZ=${config.time.timeZone}
|
|
||||||
export TZDIR=${pkgs.tzdata}/share/zoneinfo
|
export TZDIR=${pkgs.tzdata}/share/zoneinfo
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ with pkgs.lib;
|
||||||
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
|
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
|
||||||
target = "localtime";
|
target = "localtime";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,10 +161,7 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
environment =
|
environment.PGDATA = cfg.dataDir;
|
||||||
{ TZ = config.time.timeZone;
|
|
||||||
PGDATA = cfg.dataDir;
|
|
||||||
};
|
|
||||||
|
|
||||||
path = [ pkgs.su postgresql ];
|
path = [ pkgs.su postgresql ];
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,6 @@ in
|
||||||
description = "Logstash daemon";
|
description = "Logstash daemon";
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
|
|
||||||
path = [ jre ];
|
path = [ jre ];
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,6 @@ in
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
|
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ ExecStart = "${pkgs.rsyslog}/sbin/rsyslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
|
{ ExecStart = "${pkgs.rsyslog}/sbin/rsyslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/spool/rsyslog";
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/spool/rsyslog";
|
||||||
|
|
|
@ -112,8 +112,6 @@ in
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
|
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ ExecStart = "${pkgs.sysklogd}/sbin/syslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
|
{ ExecStart = "${pkgs.sysklogd}/sbin/syslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
|
||||||
# Prevent syslogd output looping back through journald.
|
# Prevent syslogd output looping back through journald.
|
||||||
|
|
|
@ -369,8 +369,6 @@ in
|
||||||
|
|
||||||
daemonType = "fork";
|
daemonType = "fork";
|
||||||
|
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
if ! [ -d /var/spool/postfix ]; then
|
if ! [ -d /var/spool/postfix ]; then
|
||||||
|
|
|
@ -56,7 +56,6 @@ in
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
exec = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --nouser-config --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid";
|
exec = "${pkgs.spamassassin}/bin/spamd ${optionalString cfg.debug "-D"} --username=spamd --groupname=spamd --nouser-config --virtual-config-dir=/var/lib/spamassassin/user-%u --allow-tell --pidfile=/var/run/spamd.pid";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -107,8 +107,6 @@ in
|
||||||
systemd.services.smartd = {
|
systemd.services.smartd = {
|
||||||
description = "S.M.A.R.T. Daemon";
|
description = "S.M.A.R.T. Daemon";
|
||||||
|
|
||||||
environment.TZ = config.time.timeZone;
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd --no-fork ${smartdFlags}";
|
serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd --no-fork ${smartdFlags}";
|
||||||
|
|
|
@ -64,7 +64,6 @@ let
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
LD_LIBRARY_PATH = nssModulesPath;
|
LD_LIBRARY_PATH = nssModulesPath;
|
||||||
TZ = config.time.timeZone;
|
|
||||||
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
|
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -90,12 +90,6 @@ in
|
||||||
|
|
||||||
startOn = "startup";
|
startOn = "startup";
|
||||||
|
|
||||||
# Needed to interpret times in the local timezone.
|
|
||||||
environment = {
|
|
||||||
TZ = config.time.timeZone;
|
|
||||||
TZDIR = "${pkgs.tzdata}/share/zoneinfo";
|
|
||||||
};
|
|
||||||
|
|
||||||
path = [ cronNixosPkg ];
|
path = [ cronNixosPkg ];
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
|
|
|
@ -618,7 +618,6 @@ in
|
||||||
|
|
||||||
environment =
|
environment =
|
||||||
{ PHPRC = if enablePHP then phpIni else "";
|
{ PHPRC = if enablePHP then phpIni else "";
|
||||||
TZ = config.time.timeZone;
|
|
||||||
} // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
|
} // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
|
|
|
@ -119,8 +119,6 @@ in
|
||||||
startOn = "started network-interfaces";
|
startOn = "started network-interfaces";
|
||||||
stopOn = "stopping network-interfaces";
|
stopOn = "stopping network-interfaces";
|
||||||
|
|
||||||
environment = { TZ = config.time.timeZone; };
|
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
''
|
''
|
||||||
# Create the base directory
|
# Create the base directory
|
||||||
|
|
|
@ -461,7 +461,6 @@ in
|
||||||
environment =
|
environment =
|
||||||
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
|
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
|
||||||
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
|
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
|
||||||
TZ = config.time.timeZone;
|
|
||||||
} # !!! Depends on the driver selected at runtime.
|
} # !!! Depends on the driver selected at runtime.
|
||||||
// optionalAttrs (!elem "nvidia" driverNames) {
|
// optionalAttrs (!elem "nvidia" driverNames) {
|
||||||
XORG_DRI_DRIVER_PATH = "${pkgs.mesa}/lib/dri";
|
XORG_DRI_DRIVER_PATH = "${pkgs.mesa}/lib/dri";
|
||||||
|
|
Loading…
Reference in a new issue