Skip to content

Commit 8578bd1

Browse files
committed
nixos/headscale: fix derp.auto_update_enabled option
The options part of "services.headscale.settings" get rendered directly into a JSON file. As such, any declared values need to match the actual config key that upstream uses or they are ineffective. One such key is "derp.auto_update_enable", which controls whether or not auto-updates for the DERP map are enabled. This key is misspellt though: the config is called "derp.auto_update_enabled", and that has always been the case since the config has been introduced in 57f46ded (Split derp into its own config struct, 2021-10-22). Any unknown key is simply ignored by Headscale, and as such the setting is ineffective. Fix this by renaming the option.
1 parent 2cd2dec commit 8578bd1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

nixos/modules/services/networking/headscale.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ in
164164
'';
165165
};
166166

167-
auto_update_enable = lib.mkOption {
167+
auto_update_enabled = lib.mkOption {
168168
type = lib.types.bool;
169169
default = true;
170170
description = ''
@@ -493,7 +493,11 @@ in
493493
imports = with lib; [
494494
(mkRenamedOptionModule
495495
[ "services" "headscale" "derp" "autoUpdate" ]
496-
[ "services" "headscale" "settings" "derp" "auto_update_enable" ]
496+
[ "services" "headscale" "settings" "derp" "auto_update_enabled" ]
497+
)
498+
(mkRenamedOptionModule
499+
[ "services" "headscale" "derp" "auto_update_enable" ]
500+
[ "services" "headscale" "settings" "derp" "auto_update_enabled" ]
497501
)
498502
(mkRenamedOptionModule
499503
[ "services" "headscale" "derp" "paths" ]

0 commit comments

Comments
 (0)