Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist files added to /etc past system updates for SteamOS 3.6+ #1355

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

5310
Copy link
Contributor

@5310 5310 commented Dec 14, 2024

Description

As of SteamOS 3.6, only files under /etc specifically allowed are persisted during system updates.

The Determinate Systems installer has a Planner target for the Steam Deck, and performs the Nixpkgs setup as a multi-user installation. However, it does not currently create the allowlist needed for the install to survive system updates and breaks as a result.

This PR adds in this allowlist for the Determinate Systems installer as helpfully defined in this comment on NixOS/nix#7173.

Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

@5310 5310 marked this pull request as ready for review December 14, 2024 17:59
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR! Got a couple comments for you, but otherwise LGTM!

src/planner/steam_deck.rs Outdated Show resolved Hide resolved
src/planner/steam_deck.rs Outdated Show resolved Hide resolved
@cole-h
Copy link
Member

cole-h commented Dec 16, 2024

Also, do you know of a way to "mimic" one of these breaking-updates? Does SteamOS have a command that I can run that will do this (even if there is no update available)?

@5310
Copy link
Contributor Author

5310 commented Dec 16, 2024

Also, do you know of a way to "mimic" one of these breaking-updates?

I was told I could try to switch to the beta channel to simulate an update, but I really didn't want to do that on my Deck 😅.

Especially not after manually reinstalling Nixpkgs the last time.

@cole-h cole-h enabled auto-merge (squash) December 16, 2024 21:13
@cole-h
Copy link
Member

cole-h commented Dec 16, 2024

Thanks, that helped me reproduce the issue! I had to move your addition outside of the block it was in (since that branch is only taken on old SteamOS versions that didn't have the Nix offload path) but after that it survived an update to the beta channel (and prior to adding this file, did not).

EDIT: note to myself (or anybody who stumbles here in the future):

If you come across the error ERROR: Could not set subvolume flags: Read-only file system after running steamos-readonly disable inside of the steamos-chroot shell, you may need to remount / as rw (mount -o remount,rw /) inside that chroot before trying again. At least, that fixed it for me.

@cole-h cole-h merged commit 0ba8809 into DeterminateSystems:main Dec 16, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants