Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Latest commit

 

History

History
36 lines (26 loc) · 909 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 909 Bytes

nix-toolchain

Experiments using Nix to manage project toolchains.

Installing Nix

This project uses Nix and Nix Flakes to manage toolchains. If you don't have Nix installed, you can install it using the Determinate Systems installer:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Usage

In a project that needs a toolchain, add flake.nix

{
  description = "A Java/Gradle Project";

  inputs = {
    bitso.url = "github:bitsoex/nix-toolchain";
  };

  outputs =
    { bitso, ... }:
    bitso.lib.mkProject {
      java = {
        enable = true;
        version = "17";
        gradle.enable = true;
      };
      redis.enable = true;
    };
}

Then to get a shell run nix develop. By default, Nix shells use bash. If you want zsh, you can run nix develop -c zsh.