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

Add support for formatting from the Deck UI #418

Draft
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Oct 4, 2024

Follow-up to #413. Closes #321.


This change set implements the formatting script in a way that works under our FHS...

... by using the method Steam would end-up using in the future? (Assuming it'll rely on steamos-manager.

With this one weird trick the script is doing, it looks like the script is actually running, and its output relayed to the parent process (e.g. Steam)... but what's actually happening is through jourald, we peek at the output of steamos-manager.service (filtering on the syslog identifier)... steamos-manager was asked to do the it through a simple dbus call.

Simply that.


Enhancements required

Prevent running against block device with mounted storage

On some of Jovian Experiment's users' systems, it's been observed that the block device where the rootfs resides is showing up in Steam as an option to target and attempt to format.

This uh... could lead to unfun results... but wasn't tried.

Unsure at which end it should happen, but checks should be made so the script fails early if the block device has any "mounted" partitions (which includes swap too).

TODO

  • Prevent running against block device with mounted storage
  • Test on non-steamdeck [should be fine]
  • Test with a USB drive

@samueldr samueldr marked this pull request as draft October 4, 2024 23:07
@samueldr samueldr force-pushed the wip/automount-and-format branch from f194032 to e415612 Compare October 6, 2024 02:56
@samueldr samueldr marked this pull request as ready for review October 6, 2024 02:56
modules/steam/steam.nix Outdated Show resolved Hide resolved
modules/steam/steam.nix Outdated Show resolved Hide resolved
pkgs/jovian-support-scripts/default.nix Outdated Show resolved Hide resolved
@samueldr samueldr force-pushed the wip/automount-and-format branch 2 times, most recently from 758c4d1 to b2cfb2d Compare October 6, 2024 03:25
The support scripts are intended to replace vendor scripts for the
little details we can't do the same way.

We're adding the pair of scripts required to format external devices.
Note that the scripts end-up relying on the steamos-manager service,
which in turn already knows how to launch the hw-support scripts.
How convenient.
This is a bit of a misnomer. It also adds "better" formatting support.
@samueldr samueldr force-pushed the wip/automount-and-format branch from b2cfb2d to 96ef195 Compare October 6, 2024 03:27
@samueldr samueldr added 2. priority: 3. low 2. topic: system integration About our integration of Steam stuff within NixOS 1. type: Enhancement Contributes a new feature, or a new package labels Oct 28, 2024
@samueldr samueldr marked this pull request as draft November 2, 2024 21:46
@samueldr
Copy link
Member Author

samueldr commented Nov 2, 2024

(Drafted to make filtering PRs easier; there's the TODO things to... do...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. type: Enhancement Contributes a new feature, or a new package 2. priority: 3. low 2. topic: system integration About our integration of Steam stuff within NixOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot mount or format microSD card
1 participant