diff options
Diffstat (limited to 'hosts/vidhar/default.nix')
-rw-r--r-- | hosts/vidhar/default.nix | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 107906c7..7335ea8a 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { hostName, flake, config, pkgs, lib, ... }: | 1 | { hostName, flake, config, pkgs, lib, ... }: |
2 | { | 2 | { |
3 | imports = with flake.nixosModules.systemProfiles; [ | 3 | imports = with flake.nixosModules.systemProfiles; [ |
4 | ./zfs.nix | 4 | ./zfs.nix ./dsl.nix |
5 | initrd-all-crypto-modules default-locale openssh rebuild-machines | 5 | initrd-all-crypto-modules default-locale openssh rebuild-machines |
6 | build-server | 6 | build-server |
7 | initrd-ssh | 7 | initrd-ssh |
@@ -26,7 +26,7 @@ | |||
26 | kernelModules = [ "kvm-intel" ]; | 26 | kernelModules = [ "kvm-intel" ]; |
27 | 27 | ||
28 | kernelParams = [ | 28 | kernelParams = [ |
29 | "ip=192.168.2.168::192.168.2.1:255.255.255.0::eno1:static" | 29 | "ip=10.141.0.1:::255.255.255.0::eno1:static" |
30 | ]; | 30 | ]; |
31 | 31 | ||
32 | tmpOnTmpfs = true; | 32 | tmpOnTmpfs = true; |
@@ -72,10 +72,9 @@ | |||
72 | useDHCP = false; | 72 | useDHCP = false; |
73 | useNetworkd = true; | 73 | useNetworkd = true; |
74 | 74 | ||
75 | defaultGateway = { address = "192.168.2.1"; }; | ||
76 | interfaces."eno1" = { | 75 | interfaces."eno1" = { |
77 | ipv4.addresses = [ | 76 | ipv4.addresses = [ |
78 | { address = "192.168.2.168"; prefixLength = 24; } | 77 | { address = "10.141.0.1"; prefixLength = 24; } |
79 | ]; | 78 | ]; |
80 | }; | 79 | }; |
81 | 80 | ||
@@ -93,9 +92,34 @@ | |||
93 | ]; | 92 | ]; |
94 | }; | 93 | }; |
95 | }; | 94 | }; |
96 | systemd.network.networks."40-eno1".networkConfig = { | 95 | |
97 | Domains = lib.mkForce "~."; | 96 | services.dhcpd4 = { |
98 | DNS = [ "192.168.2.1" ]; | 97 | enable = true; |
98 | interfaces = [ "eno1" ]; | ||
99 | }; | ||
100 | services.corerad = { | ||
101 | enable = true; | ||
102 | settings = { | ||
103 | interfaces = [ | ||
104 | { name = config.networking.pppInterface; | ||
105 | monitor = true; | ||
106 | } | ||
107 | { name = "eno1"; | ||
108 | advertise = true; | ||
109 | prefix = [{ prefix = "::/64"; }]; | ||
110 | route = [{ prefix = "::/0"; }]; | ||
111 | } | ||
112 | ]; | ||
113 | }; | ||
114 | }; | ||
115 | boot.kernel.sysctl = { | ||
116 | "net.ipv6.conf.all.forwarding" = true; | ||
117 | "net.ipv6.conf.default.forwarding" = true; | ||
118 | "net.ipv4.conf.all.forwarding" = true; | ||
119 | "net.ipv4.conf.default.forwarding" = true; | ||
120 | }; | ||
121 | systemd.network.networks = { | ||
122 | "eno2".networkConfig.LinkLocalAddressing = "no"; | ||
99 | }; | 123 | }; |
100 | 124 | ||
101 | services.timesyncd.enable = false; | 125 | services.timesyncd.enable = false; |