diff --git a/flake.nix b/flake.nix index a839431e..8b81a401 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,16 @@ buf clang-tools # clang-format ]; + + + # Add entry to build a docker image with headscale + # caveat: only works on Linux + headscale-docker = pkgs.dockerTools.buildLayeredImage { + name = "headscale"; + tag = "latest"; + contents = [ pkgs.${system}.headscale ]; + config.Entrypoint = [ (pkgs.${system}.headscale + "/bin/headscale") ]; + }; in rec { # `nix develop` @@ -92,6 +102,8 @@ # `nix build` packages = with pkgs; { inherit headscale; + inherit headscale-docker; + }; defaultPackage = pkgs.headscale; @@ -101,5 +113,6 @@ }; defaultApp = apps.headscale; + }); }