1 { config, pkgs, lib, hostName, ... }:
3 wg-intra-peers = import wireguard/wg-intra/peers.nix;
7 networking/nftables.nix
11 domain = lib.mkDefault "localdomain";
12 #search = [ "sourcephile.fr" ];
14 enable = lib.mkDefault true;
15 allowPing = lib.mkDefault true;
18 enable = lib.mkDefault config.services.xserver.enable;
20 logLevel = lib.mkDefault "INFO";
23 #backend = "wpa_supplicant";
24 powersave = lib.mkDefault false;
27 usePredictableInterfaceNames = true;
30 programs.mtr.enable = true;
31 programs.usbtop.enable = true;
34 enable = lib.mkDefault true;
35 nssmdns = lib.mkDefault true;
36 openFirewall = lib.mkDefault false;
37 publish.enable = lib.mkDefault false;
39 networking.nftables.ruleset = lib.mkIf config.services.avahi.enable (''
42 skuid root udp sport mdns udp dport mdns comment "avahi: multicast DNS"
45 '' + lib.optionalString config.services.avahi.openFirewall ''
48 udp dport mdns comment "avahi: multicast DNS"
54 enable = lib.mkDefault true;
55 forwardX11 = lib.mkDefault true;
56 openFirewall = lib.mkDefault false;
58 { addr = wg-intra-peers.${hostName}.ipv4; port = 22; }
61 networking.firewall.extraCommands = lib.mkIf config.services.openssh.enable ''
62 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 22 -j ACCEPT
64 systemd.services.sshd.after = ["wireguard-wg-intra.service"];