Skip to content

Allow running without container with nix#345

Open
avandecreme wants to merge 4 commits into
netbrain:masterfrom
avandecreme:nix_claude
Open

Allow running without container with nix#345
avandecreme wants to merge 4 commits into
netbrain:masterfrom
avandecreme:nix_claude

Conversation

@avandecreme

@avandecreme avandecreme commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

This is variant number 3 in #28

This is very much not ready for merge but since I was able to make my first ride with it, I figured I would share it already.

Things to fix before merging:

  • Remove duplicated code between existing scripts and the new nix files
  • Make it possible to switch between the existing container solution and this one
  • Fix auto-login
  • Fix process which keeps running after having quit swift
  • Cleanup, this was entirely generated by claude, so there is garbage things

@avandecreme
avandecreme marked this pull request as draft April 17, 2026 17:39
@netbrain

Copy link
Copy Markdown
Owner

Cool! it's definitely a start.

@avandecreme
avandecreme force-pushed the nix_claude branch 11 times, most recently from 1b5f6ca to 4e30e32 Compare May 20, 2026 19:07
@avandecreme
avandecreme force-pushed the nix_claude branch 4 times, most recently from f3490d2 to 325f2a4 Compare July 14, 2026 08:40
@avandecreme
avandecreme marked this pull request as ready for review July 14, 2026 08:42
@glennvl

glennvl commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

@avandecreme I appreciate the work you are doing here. But you keep force pushing a single commit with ~1500 lines changed, I'm not sure how to review that and understand all the changes, I can't follow your reasoning if it's a single commit.

Comment thread flake.nix
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

runfromprocess-rs.url = "github:quietvoid/runfromprocess-rs?rev=a3d003c07d1bd11ff93c4cac96d2c3aa5deb8471";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is not ideal because it pulls an old rust compiler. Maybe we should just embed a built binary in this repo?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why would it pull an old compiler? There's nothing in the flake indicating a specific version.
There could be a release with a pre-built binary which can be downloaded, instead.

@avandecreme avandecreme Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Why would it pull an old compiler?

Because it picks the one in the lockfile.

Apparently, I could write this to avoid that though:

  runfromprocess-rs = {
    url = "github:quietvoid/runfromprocess-rs?rev=a3d003c07d1bd11ff93c4cac96d2c3aa5deb8471";
    inputs.nixpkgs.follows = "nixpkgs";
    inputs.fenix.follows = "fenix";
  };

Using a pre-built binary would be better in my opinion. This would avoid having to pull any rust compiler.

Would you accept a PR on https://github.com/quietvoid/runfromprocess-rs to make it publish a binary on release?

@avandecreme
avandecreme force-pushed the nix_claude branch 2 times, most recently from c7658ca to 440ba48 Compare July 14, 2026 10:47
Move the container package wrapper, common derivation helpers, and NixOS
module out of flake.nix into separate files under nix/. flake.nix becomes
a thin orchestrator. No behavioral change.
Add support for running Zwift natively using Wine in a FHS environment as an alternative to containers. Introduces src/zwift-nix-fhs.sh as the FHS launch script, extends run_zwift.sh and update_zwift.sh to handle the nix-fhs container tool, adds nix/zwift-fhs-package.nix, wires up the new runfromprocess-rs input, and extends the NixOS module with containerTool = "fhs".
Parametrize the NixOS test flake to build all three containerTool values (podman, docker, fhs) and update CI to check all three.
Update the NixOS documentation with containerTool = "fhs" and winePrefix.
@avandecreme

Copy link
Copy Markdown
Contributor Author

@avandecreme I appreciate the work you are doing here. But you keep force pushing a single commit with ~1500 lines changed, I'm not sure how to review that and understand all the changes, I can't follow your reasoning if it's a single commit.

I split in four commits. Hopefully, this is more approachable. I also cleaned up stuff from claude.

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.

4 participants