ssh over tailscale

This commit is contained in:
Tristan 2024-02-17 01:39:21 +00:00
parent bcce14ea82
commit 086b3a67d9
3 changed files with 23 additions and 11 deletions

View file

@ -78,7 +78,7 @@ in {
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
# networking.interfaces.tailscale0.useDHCP = lib.mkDefault true;
networking.firewall.allowedTCPPorts = [ 22 53 80 443 ];
networking.firewall.allowedTCPPorts = [ 53 80 443 ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -50,7 +50,19 @@
};
};
programs.ssh.enable = true;
programs.ssh = {
enable = true;
matchBlocks = {
"git.tristans.cloud" = {
user = "forgejo";
hostname = "100.106.241.122";
};
"alpine" = {
hostname = "100.106.241.122";
user = "tristan";
};
};
};
programs.direnv.enable = true;
}

View file

@ -25,7 +25,16 @@ in {
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
services.tailscale.enable = true;
networking.firewall.interfaces.tailscale0 = {
allowedTCPPortRanges = [
{
from = 0;
to = 65535;
}
];
};
time.timeZone = lib.mkDefault "Europe/London";
@ -34,15 +43,6 @@ in {
useXkbConfig = true;
};
# networking.firewall.interfaces.tailscale0 = {
# allowedTCPPortRanges = [
# {
# from = 0;
# to = 65535;
# }
# ];
# };
services.avahi.enable = true;
i18n.defaultLocale = lib.mkDefault "en_GB.UTF-8";