tailscale
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
../../modules/nixos/hyprland
|
../../modules/nixos/hyprland
|
||||||
../../modules/nixos/steam
|
../../modules/nixos/steam
|
||||||
../../modules/nixos/awsvpn
|
../../modules/nixos/awsvpn
|
||||||
|
../../modules/nixos/tailscale
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
custom = {
|
custom = {
|
||||||
hyprland.enable = true;
|
hyprland.enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
##------------------------------
|
##------------------------------
|
||||||
@@ -208,9 +210,22 @@
|
|||||||
programs.awsVpnClient.enable = true;
|
programs.awsVpnClient.enable = true;
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
# OpenSSH
|
# OpenSSH: reachable through the trusted Tailscale interface, but not opened
|
||||||
services.openssh.enable = true;
|
# broadly on every network interface by the firewall.
|
||||||
programs.mosh.enable = true;
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = false;
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
AllowUsers = [ "jpporta" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.mosh = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = false;
|
||||||
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
system.stateVersion = "26.05";
|
system.stateVersion = "26.05";
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ in
|
|||||||
ripgrep
|
ripgrep
|
||||||
fd
|
fd
|
||||||
mosh
|
mosh
|
||||||
|
tailscale
|
||||||
fastfetch
|
fastfetch
|
||||||
stow
|
stow
|
||||||
tmux
|
tmux
|
||||||
@@ -163,6 +164,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
"pc" = {
|
"pc" = {
|
||||||
|
hostname = "jpporta-nixos";
|
||||||
|
user = "jpporta";
|
||||||
|
serverAliveInterval = 30;
|
||||||
|
};
|
||||||
|
|
||||||
|
"pc-lan" = {
|
||||||
hostname = "192.168.0.100";
|
hostname = "192.168.0.100";
|
||||||
user = "jpporta";
|
user = "jpporta";
|
||||||
serverAliveInterval = 30;
|
serverAliveInterval = 30;
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ in
|
|||||||
obsidian
|
obsidian
|
||||||
obs-cmd
|
obs-cmd
|
||||||
qbittorrent
|
qbittorrent
|
||||||
|
liberation_ttf
|
||||||
zathura
|
zathura
|
||||||
mpv
|
mpv
|
||||||
yt-dlp
|
yt-dlp
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.custom.tailscale;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.custom.tailscale = {
|
||||||
|
enable = lib.mkEnableOption "Tailscale private mesh VPN";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
|
# Let services bound to this host, like OpenSSH and mosh, be reachable from
|
||||||
|
# trusted devices in the tailnet without exposing them on public interfaces.
|
||||||
|
networking.firewall = {
|
||||||
|
trustedInterfaces = [ "tailscale0" ];
|
||||||
|
checkReversePath = "loose";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tailscale
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user