diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-05-13 18:19:34 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-22 12:24:32 +0200 |
commit | 925e1f91c5a13649df193a47f37a6906b13e6a83 (patch) | |
tree | 83eff504171c91f355c0721d17f39221db44c5e3 /nixos/modules | |
parent | 2c48ab43903adc1e0437f651dad35c7dd91a10e4 (diff) | |
download | nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar.gz nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar.bz2 nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar.lz nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar.xz nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.tar.zst nixlib-925e1f91c5a13649df193a47f37a6906b13e6a83.zip |
Set up /etc/machine-id before starting systemd
Otherwise, systemd will try to populate /etc, which we don't want. (cherry picked from commit c8501a421806c6526a12b2f6537ab38754e9d4ff)
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 557dc204fca3..f6113188b030 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -646,6 +646,10 @@ in # groups, in addition to those in the systemd-journal group. # Users can always read their own journals. ${pkgs.acl}/bin/setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal || true + + if ! [ -e /etc/machine-id ]; then + ${systemd}/bin/systemd-machine-id-setup + fi ''; users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network; |