fix issues

This commit is contained in:
RingOfStorms (Joshua Bell) 2026-01-06 20:39:24 -06:00
parent f8f93a97dc
commit f83697c726
4 changed files with 51 additions and 50 deletions

View file

@ -4,6 +4,14 @@
lib,
...
}:
let
hasSecret =
secret:
let
secrets = config.age.secrets or { };
in
secrets ? ${secret} && secrets.${secret} != null;
in
{
environment.systemPackages = with pkgs; [ tailscale ];
boot.kernelModules = [ "tun" ];
@ -12,7 +20,7 @@
enable = true;
openFirewall = true;
useRoutingFeatures = "client";
authKeyFile = config.age.secrets.headscale_auth.path;
authKeyFile = lib.mkIf (hasSecret "headscale_auth") config.age.secrets.headscale_auth.path;
extraUpFlags = [
"--login-server=https://headscale.joshuabell.xyz"
];