-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
0.kind: bugSomething is brokenSomething is broken
Description
Nixpkgs version
- Unstable (25.11)
Describe the bug
On a system that uses a tmpfs root, directories like /etc were previously created by the original activation scripts
nixpkgs/nixos/modules/system/etc/etc.nix
Lines 362 to 365 in 9dd4105
| # Set up the statically computed bits of /etc. | |
| echo "setting up /etc..." | |
| ${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl ${./setup-etc.pl} ${etc}/etc | |
| ''; |
It seems that nixos-init does not do this in the initrd (or at all?) which results in a missing /etc/os-release that systemd apparently needs to perform the switch-root. Otherwise, the service fails and systemd falls back to emergency.target
Steps to reproduce
- Use
tmpfsfor the root mount - Enable
system.nixos-init
Expected behaviour
The /etc directory is correctly populated
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
- system:
"x86_64-linux" - host os:
Linux 6.16.11-xanmod1, NixOS, 25.11 (Xantusia), 25.11.20251009.0b4defa - multi-user?:
yes - sandbox:
yes - version:
nix-env (Lix, like Nix) 2.93.3 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/frontear/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/frontear/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/frontear/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/frontear/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/zxl9ivn2v7xcrzlf4j036fl6av34zwv9-lix-2.93.3/share - nixpkgs:
/nix/store/0w224qci6vkj0m8m68rl9d44zmni0qjp-input-farm/nixpkgs
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
- system:
"x86_64-linux" - host os:
Linux 6.16.11-xanmod1, NixOS, 25.11 (Xantusia), 25.11.20251009.0b4defa - multi-user?:
yes - sandbox:
yes - version:
nix-env (Lix, like Nix) 2.93.3 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux, x86_64-v4-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/frontear/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/frontear/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/frontear/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/frontear/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/zxl9ivn2v7xcrzlf4j036fl6av34zwv9-lix-2.93.3/share - nixpkgs:
/nix/store/0w224qci6vkj0m8m68rl9d44zmni0qjp-input-farm/nixpkgsAdd a 👍 reaction to issues you find important.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken