Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake.nix: refactor and correctly propagate tailscale version when deploying with nix #158

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stepbrobd
Copy link

@stepbrobd stepbrobd commented Dec 30, 2024

Closes #153

Things done:

  • use flake-parts instead of flake-utils
  • fix wrong version info by setting ldflags "-X tailscale.com/version.longStamp=${tsVersion}" and "-X tailscale.com/version.shortStamp=${tsVersion}", where tsVersion is matched from go.mod using regex
  • originally, services.golink.package is set to pkgs.golink by default (which is fine), however, the module does not apply the defined overlay, causing the module to use the outdated golink from nixpkgs
  • update the dev shell go from 1.21 to 1.23
Screenshot 2024-12-29 at 19 58 52

…ploying with nix

- use flake-parts instead of flake-utils

- fix wrong version info by setting ldflags `"-X tailscale.com/version.longStamp=${tsVersion}"` and `"-X tailscale.com/version.shortStamp=${tsVersion}"`, where `tsVersion` is matched from `go.mod` using regex

- originally, `services.golink.package` is set to `pkgs.golink` by default (which is fine), however, the module does not apply the defined overlay, causing the module to use [the outdated golink from nixpkgs](https://search.nixos.org/packages?channel=unstable&show=golink&from=0&size=50&sort=relevance&type=packages&query=golink)

- update the dev shell go from 1.21 to 1.23

Signed-off-by: Yifei Sun <[email protected]>
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.

Deployment with NixOS module has Tailscale version 1.57.0-ERR-BuildInfo
1 participant