mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
![]() `/etc/os-release` of NixOS containers, which are `/var/lib/nixos-containers/*/etc/os-release` on the host, are usually symlinks to the absolute path `/etc/static/os-release` but it doesn't exist in non-NixOS host. Since `startScript` is evaluated by the host system, both `[ -e "$root/etc/os-release" ]` and `touch "$root/etc/os-release"` fail, so that the container fails to start on the second boot (on the first boot, the symlink doesn't exist, so the command succeeds). This commit avoids `touch "$root/etc/os-release"` if `$root/etc/os-release` is a symlink, so imperative NixOS containers are usable on non-NixOS host. |
||
---|---|---|
.. | ||
config | ||
hardware | ||
i18n/input-method | ||
image | ||
installer | ||
misc | ||
profiles | ||
programs | ||
security | ||
services | ||
system | ||
tasks | ||
testing | ||
virtualisation | ||
module-list.nix | ||
rename.nix |