Nixpkgs: Can't set RTC to local

Created on 22 Sep 2018  ยท  2Comments  ยท  Source: NixOS/nixpkgs

Issue description

Setting the Linux clock to local instead of UTC is a common workaround for dual booting systems with windows. The alternative, configuring windows to use UTC, is not very well supported, and many applications that simply assume the system clock is local will just not work.

See this link for a blog post outlining this.

Given that...

โฏ timedatectl set-local-rtc 1 --adjust-system-clock
Failed to set local RTC: Changing system settings via systemd is not supported on NixOS.

... and there is no NixOS option for this, what would the best approach be?

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.18.8, NixOS, 19.03.git.4f32521 (Koi)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.1.1
  • channels(root): "nixos-19.03pre152634.218ce4de508"
  • channels(chris): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
question nixos

Most helpful comment

I'd put time.hardwareClockInLocalTime = true; into your configuration.nix.

All 2 comments

I'd put time.hardwareClockInLocalTime = true; into your configuration.nix.

Heh, I saw the module for it, saw that hardwareClockInLocalTime wasn't used anywhere, rgd the nixpkgs tree, didn't see anything super evident, and I guess I was wrong. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

copumpkin picture copumpkin  ยท  3Comments

chris-martin picture chris-martin  ยท  3Comments

matthiasbeyer picture matthiasbeyer  ยท  3Comments

ob7 picture ob7  ยท  3Comments

ayyess picture ayyess  ยท  3Comments