NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.8k stars 1.52k forks source link

Read-only filesystem when upgrade system #11596

Open machadofguilherme opened 1 month ago

machadofguilherme commented 1 month ago

Describe the bug

The error occurs when I try to run nixos-rebuild switch --upgrade. During the execution of the command, the following error message appears:

building Nix...
/nix/store/xdnq3gpfj095i4rca1b7hya4zryvs7ia-nixos-rebuild/bin/nixos-rebuild: line 594: /nix/var/nix/profiles/per-user/root/channels/nixos/.version-suffix: Read-only file system
building the system configuration...

After the command finishes and restarts the computer, the changes proposed by the Nix configuration file have no effect.

Steps To Reproduce

  1. Switch to unstable branch.
  2. Run nixos-rebuild switch --upgrade

Expected behavior

A successful construction and upgrade.

nix-env --version output nix-env (Nix) 2.18.7

jkotran commented 1 month ago

I would like to validate the OP's bug report. I'm experiencing this too. I'm on STABLE. It occurs after running:

nix-channel --update

nixos-rebuild switch --upgrade

ZengarZombolt commented 1 month ago

I'm on unstable and getting the same thing with the same commands.

/nix/store/xdnq3gpfj095i4rca1b7hya4zryvs7ia-nixos-rebuild/bin/nixos-rebuild: line 594: /nix/var/nix/profiles/per-user/root/channels/nixos/.version-suffix: Read-only file system

TudbuT commented 1 month ago

Same issue here (also on unstable), but nothing appears broken except for the error message.

nixos-discourse commented 1 month ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/read-only-file-system-at-nixos-rebuild-switch/53352/5

ElvishJerricco commented 1 month ago

This is a nixpkgs bug, not a nix bug, and it was fixed here: https://github.com/NixOS/nixpkgs/pull/345254