mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos-laptop.git
synced 2026-11-03 04:24:27 +00:00
- modules/remote.nix: OpenSSH with keys only (no passwords, no root), ports 22 and 8080 (zvm_node) opened for 192.168.1.0/24 only; /etc/hosts names for both machines (DNS goes over TLS, so the router's *.lan names don't resolve) - the laptop accepts the PC's key; the PC's list is ready for the laptop's - hostName: nixos -> nexo-laptop Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
networking.hostName = "nexo-laptop";
|
|
networking.networkmanager.enable = true;
|
|
|
|
networking.firewall = {
|
|
enable = true;
|
|
allowPing = true;
|
|
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
|
|
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
|
|
allowedTCPPorts = [ 80 443 ];
|
|
};
|
|
|
|
# DNS-over-TLS via systemd-resolved; NetworkManager defers to it rather
|
|
# than writing its own /etc/resolv.conf.
|
|
networking.nameservers = [ "1.1.1.1#cloudflare-dns.com" "9.9.9.9#dns.quad9.net" ];
|
|
services.resolved = {
|
|
enable = true;
|
|
settings.Resolve = {
|
|
DNSSEC = "allow-downgrade";
|
|
DNSOverTLS = "true";
|
|
};
|
|
};
|
|
networking.networkmanager.dns = "systemd-resolved";
|
|
|
|
# Ethernet stays "stable" (pseudonymous but consistent) so static DHCP
|
|
# reservations on the router keep working; Wi-Fi is fully random.
|
|
networking.networkmanager.wifi.macAddress = "random";
|
|
networking.networkmanager.wifi.scanRandMacAddress = true;
|
|
networking.networkmanager.ethernet.macAddress = "stable";
|
|
|
|
# Disable NetworkManager's periodic captive-portal probe.
|
|
networking.networkmanager.settings.connectivity = {
|
|
uri = "";
|
|
interval = 0;
|
|
};
|
|
}
|