set version based on git rev
};
outputs = { self, nixpkgs, flake-utils, ... }:
+ let
+ headscaleVersion = if (self ? shortRev) then self.shortRev else "dev";
+ in
{
overlay = final: prev:
let
headscale =
pkgs.buildGo117Module rec {
pname = "headscale";
- version = "dev";
+ version = headscaleVersion;
src = pkgs.lib.cleanSource self;
# When updating go.mod or go.sum, a new sha will need to be calculated,
# docker load < result
headscale-docker = pkgs.dockerTools.buildLayeredImage {
name = "headscale";
- tag = "latest";
+ tag = headscaleVersion;
contents = [ pkgs.headscale ];
config.Entrypoint = [ (pkgs.headscale + "/bin/headscale") ];
};
