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.
wip/yesman
Eelco Dolstra 11 years ago
parent fa0f5bf72f
commit 945849b86f
  1. 9
      modules/config/timezone.nix
  2. 5
      modules/services/databases/postgresql.nix
  3. 1
      modules/services/logging/logstash.nix
  4. 2
      modules/services/logging/rsyslogd.nix
  5. 2
      modules/services/logging/syslogd.nix
  6. 2
      modules/services/mail/postfix.nix
  7. 1
      modules/services/mail/spamassassin.nix
  8. 2
      modules/services/monitoring/smartd.nix
  9. 1
      modules/services/network-filesystems/samba.nix
  10. 6
      modules/services/scheduling/cron.nix
  11. 1
      modules/services/web-servers/apache-httpd/default.nix
  12. 2
      modules/services/web-servers/tomcat.nix
  13. 1
      modules/services/x11/xserver.nix

@ -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";
};
};
}

@ -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 ];

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

@ -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";

@ -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.

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

@ -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";
};

@ -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}";

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

@ -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 =

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

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

@ -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";

Loading…
Cancel
Save