Skip to content

install-shortcut.sh: nixos support#83

Open
labi-le wants to merge 1 commit intoFAForever:masterfrom
labi-le:master
Open

install-shortcut.sh: nixos support#83
labi-le wants to merge 1 commit intoFAForever:masterfrom
labi-le:master

Conversation

@labi-le
Copy link
Copy Markdown

@labi-le labi-le commented Mar 20, 2026

added nixos support to the install-shortcut.sh script

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with NixOS by detecting the operating system and adjusting the generated desktop shortcut so the application launches correctly.
    • Made desktop shortcut creation conditional to better support varied Linux environments and avoid launch issues across distributions.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34ecef31-c29b-4ae8-8fa2-d3bf2d19178b

📥 Commits

Reviewing files that changed from the base of the PR and between 3522a7f and f4ed0d5.

📒 Files selected for processing (1)
  • install-shortcut.sh
✅ Files skipped from review due to trivial changes (1)
  • install-shortcut.sh

📝 Walkthrough

Walkthrough

The install-shortcut.sh script now detects NixOS by reading /etc/os-release and, when ID=nixos, prefixes the desktop entry Exec value with steam-run ; otherwise it writes the original quoted run path unchanged.

Changes

Cohort / File(s) Summary
NixOS-aware desktop entry generation
install-shortcut.sh
Adds /etc/os-release check for ID=nixos, sets an exec_prefix to steam-run when true, constructs a quoted Exec command using the prefix and $basedir/run, and writes Exec=$exec_cmd into the generated .desktop file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I sniffed the OS with care,
Nix found, I added steam-run there.
I quote the path and write the line,
Desktop shortcuts now behave just fine.
Hooray — a tidy launch, all mine! 🎮

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'install-shortcut.sh: nixos support' directly and specifically describes the main change: adding NixOS support to the install-shortcut.sh script by making the desktop entry Exec value conditional based on OS detection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.

Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@install-shortcut.sh`:
- Around line 12-16: The Exec value currently uses single quotes around
$basedir/run which violates the desktop entry spec and doesn't protect paths
with spaces; update the exec_cmd assignment in install-shortcut.sh so that it
concatenates exec_prefix with a double-quoted $basedir/run (i.e., include double
quotes around the $basedir/run portion), keeping exec_prefix as-is (exec_prefix
variable and exec_cmd are the symbols to change) so the resulting Exec string is
spec-compliant and handles spaces in basedir.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 89736eaf-6042-4cea-bb62-353e6a325ac6

📥 Commits

Reviewing files that changed from the base of the PR and between 0a98a3f and 3522a7f.

📒 Files selected for processing (1)
  • install-shortcut.sh

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.

1 participant