Skip to content

Commit

Permalink
(tailscale) migrate back to upstream module for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fbegyn committed Jan 9, 2024
1 parent 42fa54a commit bad90c8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion hosts/ania/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
programs.gnupg.package = pkgs.unstable.gnupg;
services.tailscale = {
enable = true;
package = pkgs.unstable.tailscale;
useRoutingFeatures = "client";
};

home-manager.users.francis.home.stateVersion = "23.05";
Expand Down
9 changes: 2 additions & 7 deletions hosts/bia/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,9 @@
fbegyn.x.xautolock = false;

# tailscale machine specific
fbegyn.services.tailscale = let
hosts = import ../../secrets/hosts.nix;
in {
services.tailscale = {
enable = true;
autoprovision = {
enable = false;
key = "${hosts.bia.tailscale.oneoffkey}";
};
useRoutingFeatures = "client";
};

# configure the systems wake on lan settings
Expand Down
22 changes: 11 additions & 11 deletions hosts/eos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,18 @@ in {
};

# VPN settings
fbegyn.services.tailscale = {
services.tailscale = {
enable = true;
routingFeature = "server";
autoprovision = {
enable = true;
key = "${hosts.tailscale.tempkey}";
options = [
"--advertise-routes=${hosts.eos.tailscale.routes}"
"--advertise-exit-node"
"--advertise-tags=tag:prod,tag:dcf,tag:hass"
];
};
useRoutingFeatures = "server";
# autoprovision = {
# enable = true;
# key = "${hosts.tailscale.tempkey}";
# options = [
# "--advertise-routes=${hosts.eos.tailscale.routes}"
# "--advertise-exit-node"
# "--advertise-tags=tag:prod,tag:dcf,tag:hass"
# ];
# };
};

# Web/ingress
Expand Down
5 changes: 4 additions & 1 deletion services/tailscale.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

let
cfg = config.fbegyn.services.tailscale;
isNetworkd = config.networking.useNetworkd;
in
with lib; {
options.fbegyn.services.tailscale = {
Expand Down Expand Up @@ -89,12 +90,14 @@ with lib; {
"net.ipv6.conf.all.forwarding" = mkOverride 97 true;
};

networking.firewall.checkReversePath = mkIf (cfg.routingFeature == "client" || cfg.routingFeature == "both") "loose";

systemd.services.tailscale = {
enable = true;
description = "Tailscale node agent";
documentation = [ "https://tailscale.com/kb/" ];
path = [
config.networking.resolvconf.package # for configuring DNS in some configs
config.networking.resolvconf.package # for configuring DNS in some configs
pkgs.procps # for collecting running services (opt-in feature)
pkgs.glibc
];
Expand Down

0 comments on commit bad90c8

Please sign in to comment.