How to Install VSCodium on NixOS Latest

VSCodium is a free, open-source version of Visual Studio Code without Microsoft's telemetry, branding, and licensing. In this tutorial, we will show you how to install VSCodium on NixOS Latest.

Prerequisites

Before we begin, you will need:

Step 1 - Update your NixOS Packages

To ensure that you have the latest NixOS packages, update your system using the following command:

sudo nix-channel --update && sudo nixos-rebuild switch

This command updates the package list and upgrades any outdated packages on your system.

Step 2 - Install VSCodium

VSCodium is not available in NixOS's package repository. However, we can easily install it using Nixpkgs from VSCodium's GitHub repository.

  1. Open your terminal and navigate to your home directory:

    cd ~
    
  2. Clone the VSCodium repository:

    git clone https://github.com/VSCodium/vscodium
    
  3. Navigate to the cloned directory:

    cd vscodium/
    
  4. Generate the Nix expressions using the following command:

    nix-shell -p nodejs --run "yarn && yarn package"`
    

    This command installs Node.js, fetches the VSCodium source code, installs its dependencies, and packages VSCodium as a Nix store derivation.

  5. Install VSCodium using Nix:

    nix-env -i ./result
    

    This command installs VSCodium system-wide.

    Alternatively, you could add the VSCodium derivation to your user environment using the home-manager tool if you prefer to install VSCodium into your home directory.

Step 3 - Run VSCodium

You can start VSCodium by typing codium in your terminal. You can also create a desktop file to add a VSCodium launcher to your system's applications menu.

Congratulations! You have successfully installed VSCodium on NixOS Latest using Nixpkgs. You can now enjoy safer and more privacy-respecting code editing with VSCodium.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!