feat(tailscale): set ts auth key to auto connect
This commit is contained in:
parent
56edf9e312
commit
1709e1ed56
2 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,9 @@
|
||||||
{ hostname, lib, ... }:
|
{
|
||||||
|
hostname,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = hostname;
|
hostName = hostname;
|
||||||
|
@ -28,5 +33,8 @@
|
||||||
interfaces.enp12s0.wakeOnLan.enable = true;
|
interfaces.enp12s0.wakeOnLan.enable = true;
|
||||||
};
|
};
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
services.tailscale.enable = true;
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
authKeyFile = config.sops.secrets.ts_auth_key.path;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
defaultSopsFile = ./secrets/secrets.yaml;
|
defaultSopsFile = ./secrets/secrets.yaml;
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
secrets.password.neededForUsers = true;
|
secrets.password.neededForUsers = true;
|
||||||
|
secrets.ts_auth_key = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue