FAForever / FAForever/faf-linux

Autodetect NixOS and relaunch

Ouverte
#38 3 commentaires 1 réaction 1 personne assignée Réclamée par @iczero Voir sur GitHub
Langage dominant
Shell
Étoiles
125
Forks
17
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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`
```nix
# steam
programs.steam = {
enable = true;
};
```
2. add
```nix
# steam
programs.steam = {
enable = true;
# this here \/\/\/
package = with pkgs; steam.override { extraPkgs = pkgs: [
jq
cabextract
wget
]; };
# this here /\/\/\
};
```
3. rebuild your system
4. run the `setup.sh` with `steam-run bash ""` (if you get spammed with a popup, just spam click OK)
5. follow the rest of the setup on the wiki substituting the command with being run with `steam-run bash ""`
6. Profit!
7. 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 ""`
8. More profit!

many thanks again to <@261580158798921740>

maybe
```
nix-shell -p steam-run jq cabextract wget --run "steam-run bash ''"
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.