nixpkgs/nixos/modules/system/boot
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
..
loader nixos/systemd-boot: fix error output 2022-01-14 15:42:19 -08:00
binfmt.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
emergency-mode.nix
grow-partition.nix
initrd-network.nix
initrd-openvpn.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
initrd-ssh.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
kernel.nix treewide: refactor isi686 && isx86_64 -> isx86 2021-11-20 17:50:41 -08:00
kernel_config.nix nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
kexec.nix kexec-tools: rename from kexectools to match the project name 2021-09-03 10:17:21 -04:00
luksroot.nix nixos/luksroot: sync the crypt-storage 2021-10-20 03:46:19 +03:00
modprobe.nix modprobe: install systemd's modprobe options 2022-02-22 17:22:57 +01:00
networkd.nix nixos/networking: fix assertion on IPMasquerade 2022-01-20 13:43:12 +01:00
pbkdf2-sha512.c
plymouth.nix treewide: add literalDocBook text to options with complex defaults 2021-12-09 01:38:24 +01:00
resolved.nix nixos/*: add trivial defaultText for options with simple defaults 2021-12-02 22:35:04 +01:00
shutdown.nix
stage-1-init.sh nixos/stage-1: typo fixes 2022-02-27 14:07:31 +01:00
stage-1.nix nixos/stage-1: typo fixes 2022-02-27 14:07:31 +01:00
stage-2-init.sh nixos/systemd: set TZDIR for PID 1 2021-12-16 04:09:07 +01:00
stage-2.nix
systemd-nspawn.nix nixos: Switch to default systemd-nspawn behaviour 2022-02-19 09:52:37 +01:00
systemd.nix logrotate/systemd: add 'minsize = 1M' to wtmp/btmp rotation 2022-02-27 07:20:26 +09:00
timesyncd.nix nixos/timesyncd: initialize clock file with current time 2022-03-05 21:27:45 +01:00
tmp.nix nixos/tmp: Fix format of /tmp mount options 2022-01-31 12:49:29 +01:00