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

Autodetect NixOS and relaunch #38

Open
iczero opened this issue Apr 17, 2024 · 0 comments
Open

Autodetect NixOS and relaunch #38

iczero opened this issue Apr 17, 2024 · 0 comments
Assignees

Comments

@iczero
Copy link
Member

iczero commented Apr 17, 2024

Nix can start the Steam FHS environment with the additional required packages directly from nix-shell. Scripts can autodetect a NixOS environment and reexec, instead of requiring the user to manually specify packages.

The following was from lilijoyskyseeker on the FAF Discord.

SOLVED https://discord.com/channels/197033481883222026/1228471001633914950

Instead of running in the Ubuntu Distrobox, run it on NixOS with this:

  1. Make sure Steam is installed this way in your configuration.nix
  # steam
  programs.steam = {
    enable = true;
  };
  1. add
  # steam
  programs.steam = {
    enable = true;
# this here \/\/\/
    package = with pkgs; steam.override { extraPkgs = pkgs: [
    jq
    cabextract
    wget 
    ]; };
# this here /\/\/\
  };
  1. rebuild your system
  2. run the setup.sh with steam-run bash "<path-to-setup.sh>" (if you get spammed with a popup, just spam click OK)
  3. follow the rest of the setup on the wiki substituting the command with being run with steam-run bash "<other-commands>"
  4. Profit!
  5. if you want you GUI to be able to launch the game after running install-shortcut.sh, find the .desktop file, mine was at ~/.local/share/application/com.faforever.faf-linux.desktop, and edit the Exec line to this: Exec=steam-run bash "<path-to-run>"
  6. More profit!

many thanks again to <@261580158798921740>

maybe

nix-shell -p steam-run jq cabextract wget --run "steam-run bash '<command>'"
@iczero iczero self-assigned this Apr 17, 2024
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

No branches or pull requests

1 participant