1 { pkgs, lib, config, ... }:
2 with (import networking/names-and-numbers.nix);
6 networking/ethernet.nix
9 networking/nftables.nix
10 ../../nixos/profiles/dnscrypt-proxy2.nix
11 ../../nixos/profiles/printing.nix
12 ../../nixos/profiles/networking/ssh.nix
14 install.substituteOnDestination = false;
15 networking.domain = "sp";
16 networking.useDHCP = false;
18 boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
19 networking.nftables.ruleset = lib.mkAfter ''
22 meta l4proto { udp, tcp } th dport domain counter accept comment "DNS"
23 meta l4proto { udp, tcp } th dport bootps counter accept comment "DHCP"
26 meta skuid ${config.users.users."systemd-network".name} \
27 meta l4proto { udp, tcp } th sport bootps \
28 meta l4proto { udp, tcp } th dport bootpc \
29 counter accept comment "DHCP rebinding/renewing"
31 chain forward-to-lan {
32 #jump forward-connectivity
35 chain forward-to-net {
36 #jump forward-connectivity
39 chain forward-from-net {
40 ct state established accept
41 ct state related accept
42 log level warn prefix "forward-from-net: " counter drop
45 log level warn prefix "forward: " counter drop
50 networking.networkmanager.enable = true;
64 # WARNING: settings.listen_addresses are not merged...
65 # hence there all defined here.
66 services.dnscrypt-proxy2.settings.listen_addresses = [
75 services.openssh.settings.X11Forwarding = true;
77 services.vnstat.enable = true;
79 systemd.services.sshd.serviceConfig.LoadCredentialEncrypted = [
80 "host.key:${ssh/host.key.cred}"
83 programs.wireshark = {
85 package = pkgs.wireshark-cli;