nixos-configs/modules/tailscale.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

{config, ...}: let
inherit (config.vars) hostName mainUser;
in {
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"
];
};
};
home-manager.users.${mainUser} = {
2024-01-04 03:39:14 -05:00
programs.bash.shellAliases = {
# Connect to headscale
2024-01-04 03:39:14 -05:00
tup = "tailscale up --login-server https://headscale.nelim.org";
# Desktop
2024-01-04 03:39:14 -05:00
pc = "ssh -t matt@binto 'tmux -2u new -At ${hostName}'";
# Misc Nix servers
2024-01-04 03:39:14 -05:00
oksys = "ssh -t matt@oksys 'tmux -2u new -At ${hostName}'";
servivi = "ssh -t matt@servivi 'tmux -2u new -At ${hostName}'";
# Cluster nodes
thingone = "ssh -t matt@thingone 'tmux -2u new -At ${hostName}'";
thingtwo = "ssh -t matt@thingtwo 'tmux -2u new -At ${hostName}'";
# Proxmox
2024-01-04 03:39:14 -05:00
pve = "ssh -t matt@pve 'tmux -2u new -At ${hostName}'";
# Proxmox LXC instances
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
}