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