summaryrefslogtreecommitdiff
path: root/hosts/vidhar/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-11-15 09:07:04 +0059
committerGregor Kleen <gkleen@yggdrasil.li>2021-11-15 09:07:04 +0059
commit9663c40408fde29d5ca7ea9a71373bef4b16ae8c (patch)
treec7b0392b6ebcac1ce00f6c15b608d96ae624b139 /hosts/vidhar/default.nix
parent06d301e4387aee497604ca0567c53c68f1bfb31b (diff)
downloadnixos-9663c40408fde29d5ca7ea9a71373bef4b16ae8c.tar
nixos-9663c40408fde29d5ca7ea9a71373bef4b16ae8c.tar.gz
nixos-9663c40408fde29d5ca7ea9a71373bef4b16ae8c.tar.bz2
nixos-9663c40408fde29d5ca7ea9a71373bef4b16ae8c.tar.xz
nixos-9663c40408fde29d5ca7ea9a71373bef4b16ae8c.zip
vidhar: dsl
Diffstat (limited to 'hosts/vidhar/default.nix')
-rw-r--r--hosts/vidhar/default.nix38
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;