nixpkgs/nixos/modules
Jamey Sharp 8d40083690 nixos/stage-2: create empty machine-id at boot
Previously, the activation script was responsible for ensuring that
/etc/machine-id exists. However, the only time it could not already
exist is during stage-2-init, not while switching configurations,
because one of the first things systemd does when starting up as PID 1
is to create this file. So I've moved the initialization to
stage-2-init.

Furthermore, since systemd will do the equivalent of
systemd-machine-id-setup if /etc/machine-id doesn't have valid contents,
we don't need to do that ourselves.

We _do_, however, want to ensure that the file at least exists, because
systemd also uses the non-existence of this file to guess that this is a
first-boot situation. In that case, systemd tries to create some
symlinks in /etc/systemd/system according to its presets, which it can't
do because we've already populated /etc according to the current NixOS
configuration.

This is not necessary for any other activation script snippets, so it's
okay to do it after stage-2-init runs the activation script. None of
them declare a dependency on the "systemd" snippet. Also, most of them
only create files or directories in ways that obviously don't need the
machine-id set.
2018-09-30 10:45:35 -07:00
..
config Merge branch 'master' into staging-next 2018-09-13 10:08:53 +02:00
hardware [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
i18n/input-method nixos docs: more IDs 2018-09-02 15:47:59 -04:00
installer nixos: doc: move non-service parts of service.nixosManual to documentation.nixos 2018-09-23 20:50:47 +00:00
misc nixos: doc: move non-service parts of service.nixosManual to documentation.nixos 2018-09-23 20:50:47 +00:00
profiles nixos: Fix eval error for documentation.nixos 2018-09-25 23:39:44 +02:00
programs nixos/yabar: fix module & test (#46954) 2018-09-20 12:47:46 +02:00
security acme module: fix self-signed cert with openssl 1.1 2018-09-12 13:40:46 +02:00
services Merge pull request #35690 from griff/rspamd-socketruntime 2018-09-27 14:09:12 +01:00
system nixos/stage-2: create empty machine-id at boot 2018-09-30 10:45:35 -07:00
tasks networking.hostId: fix cmd in description 2018-09-11 11:29:04 +02:00
testing nixos/tests: Set DefaultTimeoutStartSec very high (#44916) 2018-08-29 12:12:12 +02:00
virtualisation google-compute-engine: 20180510 -> 20180905 2018-09-26 11:48:16 +02:00
module-list.nix Merge pull request #46274 from mvnetbiz/libratbag 2018-09-21 22:49:17 +02:00
rename.nix nixos: doc: move non-service parts of service.nixosManual to documentation.nixos 2018-09-23 20:50:47 +00:00