diff --git a/nix/module.nix b/nix/module.nix index 8854312edf648e59770f86544af9c79d12cc5d43..1734e9fc5e8d0ee80bbd11946acd403a3de70b9c 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -27,7 +27,7 @@ type = types.str; description = "Tailscale hostname"; }; - authKey = mkOption { + auth-key = mkOption { type = types.nullOr types.str; default = null; description = "Tailscale auth key"; @@ -38,7 +38,7 @@ type = types.bool; description = "Expose on Tailscale funnel"; }; - dataDir = mkOption { + data-dir = mkOption { type = types.str; description = "tsnet data directory"; default = "/var/lib/tailproxy-${name}"; @@ -82,14 +82,14 @@ serviceConfig = { ExecStart = let args = - lib.optionals (instanceCfg.authKey != null) [ + lib.optionals (instanceCfg.auth-key != null) [ - "--auth-key=${instanceCfg.authKey}" + "--auth-key=${instanceCfg.auth-key}" ] ++ [ (lib.optionalString instanceCfg.funnel "--funnel") "--hostname=${instanceCfg.hostname}" "--port=${builtins.toString instanceCfg.port}" - "--data-dir=${instanceCfg.dataDir}" + "--data-dir=${instanceCfg.data-dir}" ]; in "${instanceCfg.package}/bin/tailproxy ${lib.concatStringsSep " " args}"; @@ -104,7 +104,7 @@ name: instanceCfg: lib.nameValuePair instanceCfg.user { isSystemUser = true; group = instanceCfg.user; - home = instanceCfg.dataDir; + home = instanceCfg.data-dir; createHome = true; } ) (lib.filterAttrs (name: instanceCfg: instanceCfg.enable) cfg.instances);