[PR #482] [MERGED] Add Nix reproducible build system #1432

Closed
opened 2025-12-29 02:30:02 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/482
Author: @kradalby
Created: 3/7/2022
Status: Merged
Merged: 4/25/2022
Merged by: @juanfont

Base: mainHead: flake-build-env


📝 Commits (10+)

  • 15f8cb5 Remove hacky go tool install
  • 5de9de1 Add flake build file
  • 124d8a3 Update readme with nix notes
  • a6570d3 Add option to build docker image
  • 63641a7 Correct pkgs call
  • c24de59 Add example commands for docker
  • 9a60eea Merge branch 'main' into flake-build-env
  • 11ccae8 Merge branch 'main' into flake-build-env
  • 06d8568 set version based on git rev
  • a806694 fix gosum merge

📊 Changes

12 files changed (+287 additions, -493 deletions)

View changed files

.envrc (+1 -0)
📝 .github/workflows/build.yml (+4 -13)
📝 .github/workflows/lint.yml (+2 -0)
📝 .github/workflows/test-integration.yml (+3 -5)
📝 .github/workflows/test.yml (+3 -16)
📝 .gitignore (+2 -2)
📝 README.md (+14 -2)
flake.lock (+42 -0)
flake.nix (+148 -0)
📝 go.mod (+30 -54)
📝 go.sum (+38 -388)
tools.go (+0 -13)

📄 Description

This pr adds a flake.nix build file, it can be used for three
things:

Build headscale from local or straight from git:

nix build
or
nix build github:juanfont/headscale

Run and Build headscale from local or straight from git:

nix run
or
nix run github:juanfont/headscale

Set up a development environment including all our tools,

  • linters
  • protobuf tooling
  • compilers
nix develop

Docker image creation:

nix build .#headscale-docker
docker load < result

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/482 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 3/7/2022 **Status:** ✅ Merged **Merged:** 4/25/2022 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `flake-build-env` --- ### 📝 Commits (10+) - [`15f8cb5`](https://github.com/juanfont/headscale/commit/15f8cb50346189a81ec2257ed85e3c1986dc82f2) Remove hacky go tool install - [`5de9de1`](https://github.com/juanfont/headscale/commit/5de9de14a936345db9c93cf10333f6d95aa9873d) Add flake build file - [`124d8a3`](https://github.com/juanfont/headscale/commit/124d8a342464f4dec86f59c1a74140071466ccc8) Update readme with nix notes - [`a6570d3`](https://github.com/juanfont/headscale/commit/a6570d33a6e48af069c4c8c9d08da55bf660872f) Add option to build docker image - [`63641a7`](https://github.com/juanfont/headscale/commit/63641a7b178d37a395f9f08e164839d8b99b5496) Correct pkgs call - [`c24de59`](https://github.com/juanfont/headscale/commit/c24de595f6ae503be854b578c4d8604ac1f4dd0b) Add example commands for docker - [`9a60eea`](https://github.com/juanfont/headscale/commit/9a60eeaf869447335bf149c49d7911b6413c743a) Merge branch 'main' into flake-build-env - [`11ccae8`](https://github.com/juanfont/headscale/commit/11ccae8e52fe6239e41cc1f234283d2cd22a9b7e) Merge branch 'main' into flake-build-env - [`06d8568`](https://github.com/juanfont/headscale/commit/06d85688fdcddf2f3ea1b5a68cf5c2c8d617a172) set version based on git rev - [`a806694`](https://github.com/juanfont/headscale/commit/a806694d235f3b58cc7575e6949a644e7f2d8afa) fix gosum merge ### 📊 Changes **12 files changed** (+287 additions, -493 deletions) <details> <summary>View changed files</summary> ➕ `.envrc` (+1 -0) 📝 `.github/workflows/build.yml` (+4 -13) 📝 `.github/workflows/lint.yml` (+2 -0) 📝 `.github/workflows/test-integration.yml` (+3 -5) 📝 `.github/workflows/test.yml` (+3 -16) 📝 `.gitignore` (+2 -2) 📝 `README.md` (+14 -2) ➕ `flake.lock` (+42 -0) ➕ `flake.nix` (+148 -0) 📝 `go.mod` (+30 -54) 📝 `go.sum` (+38 -388) ➖ `tools.go` (+0 -13) </details> ### 📄 Description This pr adds a flake.nix build file, it can be used for three things: Build `headscale` from local or straight from git: ```shell nix build or nix build github:juanfont/headscale ``` Run and Build `headscale` from local or straight from git: ```shell nix run or nix run github:juanfont/headscale ``` Set up a development environment including all our tools, - linters - protobuf tooling - compilers ```shell nix develop ``` Docker image creation: ``` nix build .#headscale-docker docker load < result ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:30:02 +01:00
adam closed this issue 2025-12-29 02:30:02 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1432