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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/planner/steam_deck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,28 @@ impl Planner for SteamDeck {
.await
.map_err(PlannerError::Action)?;
actions.push(create_bind_mount_unit.boxed());

let create_atomic_update_buf = format!(
"\
/etc/fish/conf.d/nix.fish\n\
/etc/nix/**\n\
/etc/profile.d/nix.sh\n\
/etc/systemd/system/nix-daemon.socket\n\
/etc/tmpfiles.d/nix-daemon.conf\n\
",
persistence = persistence.display(),
5310 marked this conversation as resolved.
Show resolved Hide resolved
);
let create_atomic_update_unit = CreateFile::plan(
"/etc/atomic-update.conf.d/nix.conf",
None,
None,
0o0644,
create_atomic_update_buf,
false,
)
.await
.map_err(PlannerError::Action)?;
actions.push(create_bind_mount_unit.boxed());
5310 marked this conversation as resolved.
Show resolved Hide resolved
} else {
let revert_clean_streamos_nix_offload = RevertCleanSteamosNixOffload::plan()
.await
Expand Down
12 changes: 12 additions & 0 deletions tests/fixtures/linux/steam-deck.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,18 @@
},
"state": "Completed"
},
{
"action": {
"action_name": "create_file",
"path": "/etc/atomic-update.conf.d/nix.conf",
"user": null,
"group": null,
"mode": 420,
"buf": "/etc/fish/conf.d/nix.fish\n/etc/nix/**\n/etc/profile.d/nix.sh\n/etc/systemd/system/nix-daemon.socket\n/etc/tmpfiles.d/nix-daemon.conf\n",
"force": false
},
"state": "Completed"
},
{
"action": {
"action_name": "start_systemd_unit",
Expand Down
Loading