Skip to content

Sean/nix flake - #32

Merged
Ulexus merged 3 commits into
masterfrom
sean/nix-flake
Oct 11, 2026
Merged

Ulexus merged 3 commits into
masterfrom
sean/nix-flake

Conversation

@Ulexus

@Ulexus Ulexus commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Create a nix flake for this package.

In the process, I also converted from the long-unmaintained snowpack to the fairly standard-looking esbuild, which allowed us to update the Node version to 26.

This (snowpack->esbuild) is a bit of a downgrade: it doesn't reuse dependencies across entrypoints. There may be a way to have it do so, but I didn't find it on cursory inspection. Since all files are served locally, I don't think this should present much of a problem.

@Ulexus
Ulexus force-pushed the sean/nix-flake branch 3 times, most recently from e835f6b to 7479cd1 Compare October 11, 2026 01:24
@Ulexus
Ulexus requested review from colinbdclark and a balanced review from Copilot October 11, 2026 01:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The older-flake metadata fallback can cause Nix evaluation to fail because an integer is passed to builtins.substring.

2 open findings
What changed in this PR

Adds reproducible Nix packaging while replacing Snowpack with esbuild and updating Node/Go compatibility.

Changes:

  • Adds Nix flake packages for the frontend and Go binaries.
  • Migrates frontend bundling from Snowpack to esbuild.
  • Extends release artifacts with helper binaries.
File Description
snowpack.config.js Removes Snowpack configuration.
README.md Updates Node compatibility guidance.
package.json Configures esbuild and dependencies.
main.go Removes Snowpack diagnostics and fixes logging.
go.sum Refreshes dependency checksums.
go.mod Updates Go version and indirect dependencies.
flake.nix Defines Nix packages and overlay.
flake.lock Pins nixpkgs.
cmd/​redirector/​main.go Adds an HTTPS redirect server.
cmd/​redirector/​.gitignore Ignores the redirector binary.
build.sh Removes the legacy build script.
.goreleaser.yml Adds helper binaries to releases.
.gitignore Ignores Nix and command outputs.
.github/​workflows/​release.yaml Uses Node 26 for releases.
.github/​workflows/​master.yaml Uses Node 26 for image builds.
.github/​workflows/​go.yml Uses Node 26 in CI.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread flake.nix Outdated
Comment thread README.md
@Ulexus
Ulexus force-pushed the sean/nix-flake branch 2 times, most recently from 12375f5 to 968f94e Compare October 11, 2026 12:44
 - updates Node to v26
 - replaces snowpack with esbuild
@Ulexus
Ulexus merged commit 828447d into master Oct 11, 2026
1 check passed
@Ulexus
Ulexus deleted the sean/nix-flake branch October 11, 2026 21:43
@colinbdclark

Copy link
Copy Markdown
Collaborator

Thanks for this, @Ulexus, and apologies that I was slow to take a look at your PR. I'm glad the esbuild switch was so straightforward. This flake makes building audimance so much easier! Well, aside from the fact that there's no cached binary for nodejs-slim-26 on aarch64-darwin, so I had the exhilarating experience of watching V8 build from source for an hour. 🤣 That's an upstream problem, not anything we can address.

@Ulexus

Ulexus commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Oof; yes, it was surprisingly fast locally, here. They're got some serious caching in place. I'm throwing together a NixOS setup for the audimance-a machine, since the old one is completely beyond the point of trying to update in place, and I'm loathe to do another hand build on it.

I also don't have a clue what else might be needed on the javascript side of the house. esbuild was all I needed to just compile it, but feel free to extend the package set if there are more things needed to develop with it.

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.

3 participants