]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/oignon/networking.nix
htop: tweak settings
[julm/julm-nix.git] / hosts / oignon / networking.nix
1 { config, pkgs, lib, hostName, ... }:
2 let
3 wlan1Iface = "wlp2s0";
4 wlan2Iface = "wlp0s26u1u2";
5 wwanIface = "wwp0s29u1u4";
6 ethIface = "enp0s25";
7 in
8 {
9 imports = [
10 ../../nixos/profiles/networking.nix
11 ../../nixos/profiles/dnscrypt-proxy2.nix
12 ../../nixos/profiles/wireguard/wg-intra.nix
13 networking/nftables.nix
14 ];
15 install.substituteOnDestination = false;
16 #networking.domain = "sourcephile.fr";
17 networking.useDHCP = false;
18
19 networking.nftables.ruleset = lib.mkAfter ''
20 table inet filter {
21 chain input {
22 goto input-net
23 }
24 chain output {
25 ip daddr 10.0.0.0/8 counter goto output-lan
26 ip daddr 172.16.0.0/12 counter goto output-lan
27 ip daddr 192.168.0.0/16 counter goto output-lan
28 ip daddr 224.0.0.0/3 counter goto output-lan
29 jump output-net
30 log level warn prefix "output-net: " counter drop
31 }
32 }
33 '';
34
35 networking.interfaces = {
36 };
37
38 networking.networkmanager = {
39 enable = true;
40 unmanaged = [
41 ];
42 };
43 environment.etc."NetworkManager/system-connections/Prixtel.nmconnection" = {
44 mode = "600";
45 text = ''
46 [connection]
47 id=Prixtel
48 uuid=b223f550-dff1-4ba3-9755-cd4557faaa5a
49 type=gsm
50 autoconnect=false
51 permissions=user:julm:;
52
53 [gsm]
54 apn=sl2sfr
55 number=*99#
56 home-only=true
57
58 [ppp]
59
60 [ipv4]
61 method=auto
62
63 [ipv6]
64 addr-gen-mode=stable-privacy
65 method=disabled
66
67 [proxy]
68 '';
69 };
70
71 networking.wireguard.wg-intra.peers = {
72 mermet.enable = true;
73 losurdo.enable = true;
74 patate.enable = true;
75 aubergine.enable = true;
76 };
77
78 services.openssh.listenAddresses = [
79 ];
80
81 environment.systemPackages = [
82 pkgs.iw
83 pkgs.modem-manager-gui
84 ];
85 }