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:
Eelco Dolstra 2013-04-22 18:56:19 +02:00
parent fa0f5bf72f
commit 945849b86f
13 changed files with 5 additions and 30 deletions

View File

@ -6,7 +6,7 @@ with pkgs.lib;
options = {
time = {
timeZone = mkOption {
default = "CET";
type = with types; uniq string;
@ -18,7 +18,7 @@ with pkgs.lib;
default = false;
description = "If set, keep the hardware clock in local time instead of UTC.";
};
};
};
@ -26,7 +26,6 @@ with pkgs.lib;
environment.shellInit =
''
export TZ=${config.time.timeZone}
export TZDIR=${pkgs.tzdata}/share/zoneinfo
'';
@ -34,7 +33,7 @@ with pkgs.lib;
{ source = "${pkgs.tzdata}/share/zoneinfo/${config.time.timeZone}";
target = "localtime";
};
};
}

View File

@ -161,10 +161,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
environment =
{ TZ = config.time.timeZone;
PGDATA = cfg.dataDir;
};
environment.PGDATA = cfg.dataDir;
path = [ pkgs.su postgresql ];

View File

@ -140,7 +140,6 @@ in
description = "Logstash daemon";
wantedBy = [ "multi-user.target" ];
environment.TZ = config.time.timeZone;
path = [ jre ];

View File

@ -92,8 +92,6 @@ in
wantedBy = [ "multi-user.target" ];
environment.TZ = config.time.timeZone;
serviceConfig =
{ ExecStart = "${pkgs.rsyslog}/sbin/rsyslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p /var/spool/rsyslog";

View File

@ -112,8 +112,6 @@ in
wantedBy = [ "multi-user.target" ];
environment.TZ = config.time.timeZone;
serviceConfig =
{ ExecStart = "${pkgs.sysklogd}/sbin/syslogd ${toString cfg.extraParams} -f ${syslogConf} -n";
# Prevent syslogd output looping back through journald.

View File

@ -369,8 +369,6 @@ in
daemonType = "fork";
environment.TZ = config.time.timeZone;
preStart =
''
if ! [ -d /var/spool/postfix ]; then

View File

@ -56,7 +56,6 @@ in
wantedBy = [ "multi-user.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";
};

View File

@ -107,8 +107,6 @@ in
systemd.services.smartd = {
description = "S.M.A.R.T. Daemon";
environment.TZ = config.time.timeZone;
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd --no-fork ${smartdFlags}";

View File

@ -64,7 +64,6 @@ let
environment = {
LD_LIBRARY_PATH = nssModulesPath;
TZ = config.time.timeZone;
LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
};

View File

@ -90,12 +90,6 @@ in
startOn = "startup";
# Needed to interpret times in the local timezone.
environment = {
TZ = config.time.timeZone;
TZDIR = "${pkgs.tzdata}/share/zoneinfo";
};
path = [ cronNixosPkg ];
preStart =

View File

@ -618,7 +618,6 @@ in
environment =
{ PHPRC = if enablePHP then phpIni else "";
TZ = config.time.timeZone;
} // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
preStart =

View File

@ -119,8 +119,6 @@ in
startOn = "started network-interfaces";
stopOn = "stopping network-interfaces";
environment = { TZ = config.time.timeZone; };
preStart =
''
# Create the base directory

View File

@ -461,7 +461,6 @@ in
environment =
{ FONTCONFIG_FILE = "/etc/fonts/fonts.conf"; # !!! cleanup
XKB_BINDIR = "${xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
TZ = config.time.timeZone;
} # !!! Depends on the driver selected at runtime.
// optionalAttrs (!elem "nvidia" driverNames) {
XORG_DRI_DRIVER_PATH = "${pkgs.mesa}/lib/dri";