Skip to content

feat(nix): Introduce a flake.nix to allow building and running engram with Nix#80

Open
0xErwin1 wants to merge 1 commit intoGentleman-Programming:mainfrom
0xErwin1:main
Open

feat(nix): Introduce a flake.nix to allow building and running engram with Nix#80
0xErwin1 wants to merge 1 commit intoGentleman-Programming:mainfrom
0xErwin1:main

Conversation

@0xErwin1
Copy link

Summary

This PR adds Nix flake support for Engram.

It allows building and running the project reproducibly without installing Go manually.

Run Engram directly:

nix run github:Gentleman-Programming/engram

Build locally:

nix build
./result/bin/engram

A new section was added to the README describing how to use Engram with Nix, including optional integration examples for Home Manager and NixOS.

Motivation

Nix provides reproducible builds and isolated development environments.

Adding a flake allows developers using Nix to build, run, and develop Engram without installing Go or managing dependencies manually. This is particularly useful for users on NixOS or those using Home Manager.

Changes

  • Added flake.nix to build Engram using buildGoModule
  • Added a reproducible development shell via nix develop
  • Added README documentation for installing and running Engram with Nix
  • Included optional examples for Home Manager and NixOS integration

Test plan

  • go test ./... passes
  • Manually tested the affected functionality
  • nix build
  • nix run
  • Integrated with home-manager and run with opencode

Tested locally with:

nix build
nix run
nix develop

Confirmed that the engram binary builds and runs correctly.

Note

If there is interest, I can also submit a follow-up PR to add Engram to the
nixpkgs repository so it can be installed via:

nix profile install nixpkgs#engram

Introduce a flake.nix to allow building and running engram with Nix.

Usage:

  nix build
  nix run
  nix develop
@0xErwin1 0xErwin1 changed the title Introduce a flake.nix to allow building and running engram with Nix feat(nix): Introduce a flake.nix to allow building and running engram with Nix Mar 14, 2026
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