FAForever / FAForever/faf-linux

Autodetect NixOS and relaunch

Đang mở
#38 3 bình luận 1 reaction 1 người được giao Được @iczero nhận Xem trên GitHub
Ngôn ngữ chính
Shell
Star
125
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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 ''"
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.