Author: eelco Date: Thu Oct 27 19:36:03 2011 New Revision: 30071 URL: https://nixos.org/websvn/nix/?rev=30071&sc=1
Log: * Create /etc/localtime as a symlink to the right zoneinfo file. However, this won't do anything until we merge the stdenv branch. Modified: nixos/trunk/modules/config/timezone.nix Modified: nixos/trunk/modules/config/timezone.nix ============================================================================== --- nixos/trunk/modules/config/timezone.nix Thu Oct 27 19:06:23 2011 (r30070) +++ nixos/trunk/modules/config/timezone.nix Thu Oct 27 19:36:03 2011 (r30071) @@ -1,10 +1,11 @@ -{pkgs, config, ...}: +{ config, pkgs, ... }: -let +with pkgs.lib; +{ options = { - time.timeZone = pkgs.lib.mkOption { + time.timeZone = mkOption { default = "CET"; example = "America/New_York"; description = "The time zone used when displaying times and dates."; @@ -12,14 +13,19 @@ }; -in - -{ - require = [options]; + config = { - environment.shellInit = - '' - export TZ=${config.time.timeZone} - export TZDIR=${pkgs.glibc}/share/zoneinfo - ''; + environment.shellInit = + '' + export TZ=${config.time.timeZone} + export TZDIR=${pkgs.glibc}/share/zoneinfo + ''; + + environment.etc = singleton + { source = "${pkgs.glibc}/share/zoneinfo/${config.time.timeZone}"; + target = "localtime"; + }; + + }; + } _______________________________________________ nix-commits mailing list nix-comm...@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-commits