test out tailscale
This commit is contained in:
@@ -103,6 +103,7 @@ in {
|
|||||||
iotop
|
iotop
|
||||||
inetutils
|
inetutils
|
||||||
nettools
|
nettools
|
||||||
|
wireguard-tools
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,14 +137,14 @@
|
|||||||
networking.wg-quick.interfaces = {
|
networking.wg-quick.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
autostart = true;
|
autostart = true;
|
||||||
address = [ "10.100.0.1/24" "fd42:4242:4242::1/64" ];
|
address = [ "10.100.0.1/24" "fd42:42:42::1/64" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
privateKeyFile = config.age.secrets.wireguard.path;
|
privateKeyFile = config.age.secrets.wireguard.path;
|
||||||
peers = [
|
peers = [
|
||||||
{
|
{
|
||||||
# kop pc
|
# kop pc
|
||||||
publicKey = "YgecbWSNRqOmylYqxr/V21LL3UpKEr5x42lXPAxriSc=";
|
publicKey = "YgecbWSNRqOmylYqxr/V21LL3UpKEr5x42lXPAxriSc=";
|
||||||
allowedIPs = [ "10.100.0.2/32" "fd42:4242:4242::2/128" ];
|
allowedIPs = [ "10.100.0.2/32" "fd42:42:42::2/128" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,6 +64,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://github.com/juanfont/headscale/blob/main/config-example.yaml
|
||||||
|
#networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||||
|
#services.headscale = {
|
||||||
|
# enable = true;
|
||||||
|
# address = "0.0.0.0";
|
||||||
|
# settings = {
|
||||||
|
# server_url = "http://0.0.0.0:8080";
|
||||||
|
# logtail.enable = false;
|
||||||
|
# dns = {
|
||||||
|
# base_domain = "kopatz.dev";
|
||||||
|
# override_local_dns = false;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
#environment.systemPackages = with pkgs; [
|
||||||
|
# headscale
|
||||||
|
#];
|
||||||
|
|
||||||
#fileSystems."/" = {
|
#fileSystems."/" = {
|
||||||
# device = "/dev/disk/by-label/nixos";
|
# device = "/dev/disk/by-label/nixos";
|
||||||
# fsType = "ext4";
|
# fsType = "ext4";
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
../../modules/misc/zram.nix
|
../../modules/misc/zram.nix
|
||||||
#../../modules/hardware/ryzenmonitor.nix
|
#../../modules/hardware/ryzenmonitor.nix
|
||||||
../../modules/networkmanager.nix
|
../../modules/networkmanager.nix
|
||||||
|
#./tailscale-client.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
custom = {
|
custom = {
|
||||||
|
|||||||
10
systems/pc/tailscale-client.nix
Normal file
10
systems/pc/tailscale-client.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{pkgs, lib, config, ...}:
|
||||||
|
{
|
||||||
|
# Run tailscale up --login-server http://<headscale_server>
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
networking.firewall = {
|
||||||
|
checkReversePath = "loose";
|
||||||
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
|
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user