nixos-configs/modules/tailscale.nix

30 lines
996 B
Nix
Raw Normal View History

{config, ...}: {
2023-10-20 13:03:36 -04:00
services = {
tailscale = {
enable = true;
2024-01-04 03:39:14 -05:00
# TODO: add authKeyFile to get extraUpFlags to work
2023-10-20 13:03:36 -04:00
extraUpFlags = [
"--login-server https://headscale.nelim.org"
"--operator=matt"
];
};
};
2024-01-04 03:39:14 -05:00
home-manager.users.${config.vars.user} = let
hostName = config.vars.hostName;
in {
programs.bash.shellAliases = {
tup = "tailscale up --login-server https://headscale.nelim.org";
2024-01-04 03:39:14 -05:00
pc = "ssh -t matt@binto 'tmux -2u new -At ${hostName}'";
oksys = "ssh -t matt@oksys 'tmux -2u new -At ${hostName}'";
servivi = "ssh -t matt@servivi 'tmux -2u new -At ${hostName}'";
pve = "ssh -t matt@pve 'tmux -2u new -At ${hostName}'";
2024-01-04 03:39:14 -05:00
pod = "mosh matt@pve -- ssh -t -p 6768 matt@10.0.0.122 'tmux -2u new -At ${hostName}'";
jelly = "mosh matt@pve -- ssh -t matt@10.0.0.123 'tmux -2u new -At ${hostName}'";
qbit = "mosh matt@pve -- ssh -t matt@10.0.0.128 'tmux -2u new -At ${hostName}'";
};
};
2023-10-20 13:03:36 -04:00
}