nixos/etc: create uninitialized /etc/machine-id with readonly /etc/ - #523894
Conversation
|
IIUC, with this fix, systemd will generate a new transient I think it would be preferable to symlink or bind-mount |
This resolves NixOS#523878 where /etc/ is readonly and /etc/machine-id cannot be created. Instead, /etc/machine-id is initialized to "uninitialized" by systemd-tmpfiles in initrd and persisted in /var/lib/nixos.
ce86492 to
6e5b633
Compare
|
Thanks for the reference to nix-community/preservation. I used the same approach with systemd-tmpfiles to initialize /var/lib/nixos/machine-id. This is outside the scope of the PR, but perhaps it would be beneficial to bring something similar to the preservation library into core nixos? |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/6993 |
This closes #523878 where /etc/ is readonly and /etc/machine-id cannot be created. This also fixes the
activation-etc-overlay-immutabletest, and likely others.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.