diff options
author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-06-15 23:46:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-15 23:46:36 -0400 |
commit | c555d2ea4e383fd41e3d41dfd75fa19048207fa9 (patch) | |
tree | 3c213d00be450ea36c7974d74a129f355afe1e3c | |
parent | c9271ba1ae90af4f4ac584fae277e7ad8069e2fe (diff) | |
parent | b54cb6cd11597a96e03cc290fda50b0fc638a277 (diff) |
Merge pull request #318832 from adamcstephens/headscale/trim-secret
headscale: backport trim of oidc secret path
-rw-r--r-- | pkgs/servers/headscale/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/headscale/trim-oidc-secret-path.patch | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/servers/headscale/default.nix b/pkgs/servers/headscale/default.nix index e1f508aa766ad..8bb5a1eef31b5 100644 --- a/pkgs/servers/headscale/default.nix +++ b/pkgs/servers/headscale/default.nix @@ -18,6 +18,11 @@ buildGoModule rec { vendorHash = "sha256-IOkbbFtE6+tNKnglE/8ZuNxhPSnloqM2sLgTvagMmnc="; + patches = [ + # backport of https://github.com/juanfont/headscale/pull/1697 + ./trim-oidc-secret-path.patch + ]; + ldflags = ["-s" "-w" "-X github.com/juanfont/headscale/cmd/headscale/cli.Version=v${version}"]; nativeBuildInputs = [installShellFiles]; diff --git a/pkgs/servers/headscale/trim-oidc-secret-path.patch b/pkgs/servers/headscale/trim-oidc-secret-path.patch new file mode 100644 index 0000000000000..4275988aa7db6 --- /dev/null +++ b/pkgs/servers/headscale/trim-oidc-secret-path.patch @@ -0,0 +1,13 @@ +diff --git a/hscontrol/config.go b/hscontrol/config.go +index 0e83a1c..71fbfb0 100644 +--- a/hscontrol/config.go ++++ b/hscontrol/config.go +@@ -573,7 +573,7 @@ func GetHeadscaleConfig() (*Config, error) { + if err != nil { + return nil, err + } +- oidcClientSecret = string(secretBytes) ++ oidcClientSecret = strings.TrimSpace(string(secretBytes)) + } + + return &Config{ |