bug: stop trying to auto-set all tailscale things
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
@@ -8,17 +7,6 @@
|
|||||||
let
|
let
|
||||||
cfg = config.greg.tailscale;
|
cfg = config.greg.tailscale;
|
||||||
tags = lib.concatMapStringsSep "," (s: "tag:${s}") cfg.tags;
|
tags = lib.concatMapStringsSep "," (s: "tag:${s}") cfg.tags;
|
||||||
setScript = pkgs.writeShellApplication {
|
|
||||||
name = "tailscale-set";
|
|
||||||
runtimeInputs = [
|
|
||||||
config.services.tailscale.package
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
tailscale set --accept-routes
|
|
||||||
tailscale set --hostname ${cfg.hostname}
|
|
||||||
''
|
|
||||||
+ lib.optionalString ((builtins.length cfg.tags) > 0) "tailscale set --advertise-tags ${tags}";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
@@ -58,15 +46,6 @@ in
|
|||||||
useRoutingFeatures = "both";
|
useRoutingFeatures = "both";
|
||||||
};
|
};
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
tailscale-set = {
|
|
||||||
enable = true;
|
|
||||||
after = [
|
|
||||||
"tailscaled.service"
|
|
||||||
"tailscale-autoconnect.service"
|
|
||||||
];
|
|
||||||
partOf = [ "network-online.target" ];
|
|
||||||
script = lib.getExe setScript;
|
|
||||||
};
|
|
||||||
tailscaled.partOf = [ "network-online.target" ];
|
tailscaled.partOf = [ "network-online.target" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user