FAForever / FAForever/faf-linux

Autodetect NixOS and relaunch

未关闭
#38 3 条评论 1 个 reaction 已指派 1 人 已被 @iczero 认领 在 GitHub 查看
主要语言
Shell
星标
125
派生
17
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。