]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/courge/networking.nix
Add given password for hosts/courge/wireguard/wg-intra/privateKey to store.
[julm/julm-nix.git] / hosts / courge / networking.nix
1 { pkgs, lib, ... }:
2 {
3 imports = [
4 ../../nixos/profiles/dnscrypt-proxy2.nix
5 ../../nixos/profiles/wireguard/wg-intra.nix
6 ../../nixos/profiles/networking/ssh.nix
7 ../../nixos/profiles/networking/wifi.nix
8 ./wireguard.nix
9 networking/nftables.nix
10 ];
11 install.substituteOnDestination = false;
12 #networking.domain = "wg";
13 networking.useDHCP = false;
14
15 networking.nftables.ruleset = lib.mkAfter ''
16 table inet filter {
17 chain input {
18 goto input-net
19 }
20 chain output {
21 ip daddr 10.0.0.0/8 counter goto output-lan
22 ip daddr 172.16.0.0/12 counter goto output-lan
23 ip daddr 192.168.0.0/16 counter goto output-lan
24 ip daddr 224.0.0.0/3 counter goto output-lan
25 jump output-net
26 log level warn prefix "output-net: " counter drop
27 }
28 }
29 '';
30
31 networking.interfaces = { };
32
33 networking.networkmanager = {
34 enable = true;
35 unmanaged = [
36 ];
37 };
38
39 services.avahi.enable = true;
40 services.avahi.openFirewall = false;
41 services.avahi.publish.enable = false;
42
43 services.openssh.settings.X11Forwarding = true;
44 systemd.services.sshd.serviceConfig.LoadCredentialEncrypted = [
45 "host.key:${ssh/host.key.cred}"
46 ];
47
48 services.vnstat.enable = true;
49 }