fix issues
This commit is contained in:
parent
f8f93a97dc
commit
f83697c726
4 changed files with 51 additions and 50 deletions
|
|
@ -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"
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue