1 { config, pkgs, lib, hostName, ... }:
3 wg-intra-peers = import wireguard/wg-intra/peers.nix;
8 domain = lib.mkDefault "localdomain";
9 #search = [ "sourcephile.fr" ];
11 enable = lib.mkDefault true;
12 allowPing = lib.mkDefault true;
15 enable = lib.mkDefault config.services.xserver.enable;
17 logLevel = lib.mkDefault "INFO";
20 #backend = "wpa_supplicant";
21 powersave = lib.mkDefault false;
26 programs.mtr.enable = true;
27 programs.usbtop.enable = true;
30 enable = lib.mkDefault true;
31 nssmdns = lib.mkDefault true;
32 openFirewall = lib.mkDefault false;
33 publish.enable = lib.mkDefault false;
37 enable = lib.mkDefault true;
38 forwardX11 = lib.mkDefault true;
39 openFirewall = lib.mkDefault false;
41 { addr = wg-intra-peers.${hostName}.ipv4; port = 22; }
44 networking.firewall.extraCommands = lib.mkIf config.services.openssh.enable ''
45 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 22 -j ACCEPT
47 systemd.services.sshd.after = ["wireguard-wg-intra.service"];