Jump to content

Godot: Difference between revisions

From NixOS Wiki
Mention godot-mono for C#
Installation: Basic instructions for Godot-Mono VSCode.
Line 11: Line 11:
Add either <code>pkgs.godot</code> (GDScript) or <code>pkgs.godot-mono</code> (GDScript + C#) to <code>environment.systemPackages</code>.
Add either <code>pkgs.godot</code> (GDScript) or <code>pkgs.godot-mono</code> (GDScript + C#) to <code>environment.systemPackages</code>.


==== Enabling VSCode Editor for Godot-Mono (C#) ====
As Godot editor lacks optimization for C#, VSCode editor is recommended.
Configure Godot's '''Editor → Editor Settings''' menu:
* Set '''Dotnet''' -> '''Editor''' -> '''External Editor''' to '''Visual Studio Code'''.
Install and configure VSCode as such:
programs.vscode = {
  enable = true;
  package = pkgs.codium;
  profiles.default = {
    "godotTools.lsp.serverPort" = 6005; # port should match your Godot configuration
    "dotnetAcquisitionExtension.sharedExistingDotnetPath" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
    "dotnetAcquisitionExtension.existingDotnetPath" = [
        {
           "extensionId" = "ms-dotnettools.csharp";
           "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
        }
        {
           "extensionId" = "ms-dotnettools.csdevkit";
           "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
        }
     ];
  extensions = with pkgs.vscode-extensions; [
    geequlim.godot-tools # For Godot GDScript
    ms-dotnettools.csdevkit
    ms-dotnettools.csharp
    ms-dotnettools.vscode-dotnet-runtime
  ];
};
[[Category:Applications]]
[[Category:Applications]]

Revision as of 14:15, 10 April 2025

☶︎
This article or section needs to be expanded. Further information may be found in the related discussion page. Please consult the pedia article metapage for guidelines on contributing.

Godot is an open-source game engine, capable of creating both 2D and 3D games.

Usage in NixOS

Use steam-run to run a Godot exported project (without having to fix paths for Nix).

Installation

Add either pkgs.godot (GDScript) or pkgs.godot-mono (GDScript + C#) to environment.systemPackages.

Enabling VSCode Editor for Godot-Mono (C#)

As Godot editor lacks optimization for C#, VSCode editor is recommended.

Configure Godot's Editor → Editor Settings menu:

  • Set Dotnet -> Editor -> External Editor to Visual Studio Code.

Install and configure VSCode as such:

programs.vscode = {
  enable = true;
  package = pkgs.codium;
  profiles.default = {
    "godotTools.lsp.serverPort" = 6005; # port should match your Godot configuration
    "dotnetAcquisitionExtension.sharedExistingDotnetPath" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
    "dotnetAcquisitionExtension.existingDotnetPath" = [
       {
          "extensionId" = "ms-dotnettools.csharp";
          "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
       }
       {
          "extensionId" = "ms-dotnettools.csdevkit";
          "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
       }
    ];
  extensions = with pkgs.vscode-extensions; [
    geequlim.godot-tools # For Godot GDScript
    ms-dotnettools.csdevkit
    ms-dotnettools.csharp
    ms-dotnettools.vscode-dotnet-runtime
  ];
};