]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/oignon/networking.nix
office: pdfScale dependencies
[julm/julm-nix.git] / hosts / oignon / 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 ../../nixos/profiles/openvpn/calyx.nix
9 networking/nftables.nix
10 ];
11 install.substituteOnDestination = false;
12 #networking.domain = "sourcephile.fr";
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 environment.etc."NetworkManager/system-connections/Prixtel.nmconnection" = {
39 mode = "600";
40 text = ''
41 [connection]
42 id=Prixtel
43 uuid=b223f550-dff1-4ba3-9755-cd4557faaa5a
44 type=gsm
45 autoconnect=false
46 permissions=user:julm:;
47
48 [gsm]
49 apn=sl2sfr
50 number=*99#
51 home-only=true
52
53 [ppp]
54
55 [ipv4]
56 method=auto
57
58 [ipv6]
59 addr-gen-mode=stable-privacy
60 method=disabled
61
62 [proxy]
63 '';
64 };
65
66 networking.wireguard.wg-intra.peers = {
67 mermet.enable = true;
68 losurdo.enable = true;
69 patate.enable = true;
70 aubergine.enable = true;
71 };
72
73 environment.systemPackages = [
74 pkgs.iw
75 pkgs.modem-manager-gui
76 ];
77 }