Skip to content

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

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

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

stepbrobd
Copy link
Contributor

@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  and , where  is matched from  using regex

- originally, is set to  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 <ysun@hey.com>
Copy link
Contributor

@mikeodr mikeodr left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, this looks great, thanks!

@mikeodr mikeodr merged commit 228a54b into tailscale:main Mar 3, 2025
1 check passed
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
2 participants