nixpkgs/nixos/modules
Andreas Rammhold d67caf3c89 nixos/timesyncd: initialize clock file with current time
When initializing a system (e.g. first boot / livecd) we have no good
reference source for time. systemd-timesyncd however would revert back
to its configured fallback time (in our case 01.01.1980). Since we
probably don't want to hardcode a specific date as fallback we are now
using the current system time (wherever that might have come from) to
initialize the reference clock file.

The only systems that might be remotely affected by this change are
machines that have highly unreliable RTCs or those where the battery
that backs the RTC is running empty.

Historically these systems always had a tough time with anything time
related and likely required manual intervention.

For stateless systems (those that wipe / between reboots or our
installer CDs) this has the consequence that time will always be reset
to whatever the system comes up with on boot. This is likely the correct
time coming from an RTC. No harm done here the situation is likely
unchanged for them.

For stateful systems (those that retain the / partition across reboots)
there shouldn't be a change at all. They'll provide an initial clock
value once on their lifetime (during first boot / after installation).
From then onwards systemd-timesyncd will update the file with the newer
fallback time (that will be picked up on the next boot).
2022-03-05 21:27:45 +01:00
..
config nixos/users: Fix type error 2022-02-05 22:38:56 +01:00
hardware nixos/xone: init 2022-02-20 18:25:12 +13:00
i18n/input-method nixos/documentation: split options doc build 2022-01-02 19:46:13 +01:00
installer Merge pull request #156005 from zhaofengli/pi02 2022-02-24 15:05:23 -05:00
misc nixos/os-release: generate from attrset 2022-03-04 09:36:40 +08:00
profiles nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
programs Merge pull request #156858: nixos/polkit: don't enable by default 2022-03-05 14:48:35 +01:00
security Merge pull request #156858: nixos/polkit: don't enable by default 2022-03-05 14:48:35 +01:00
services Merge pull request #162407 from mweinelt/zigbee2mqtt 2022-03-05 15:33:57 +01:00
system nixos/timesyncd: initialize clock file with current time 2022-03-05 21:27:45 +01:00
tasks treewide: remove obsolete kernel version checks 2022-02-19 21:09:19 +00:00
testing nixos/tests: also set TimeoutStart in systemd.user.extraConfig 2022-01-21 04:18:05 +01:00
virtualisation nixos/amazon-image: use 5_10 kernel and add assert 2022-02-27 15:04:37 -08:00
module-list.nix Merge pull request #162407 from mweinelt/zigbee2mqtt 2022-03-05 15:33:57 +01:00
rename.nix Remove F-PROT package and service module (EoL) (#160372) 2022-03-02 21:51:47 +02:00