]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/hosting/localhost.nix
mermet: improve the boot
[sourcephile-nix.git] / servers / mermet / hosting / localhost.nix
1 { pkgs, lib, config, options, nodes, ... }:
2 let ipv4 = if options.networking.privateIPv4.isDefined
3 then config.networking.privateIPv4
4 else "X.X.X.X";
5 in
6 {
7 }
8 // lib.mkIf (builtins.hasAttr "mermet" nodes) {
9 networking = {
10 interfaces."enp0s8" = {
11 #macAddress = "00:11:22:33:44:55";
12 #ipv4.addresses = [ { address = ipv4; prefixLength = 32; } ];
13 ipv6.addresses = [ { address = "fe80::1"; prefixLength = 10; } ];
14 };
15 zones = {
16 net = {
17 iface = "enp0s3";
18 ipv4 = ipv4;
19 };
20 lan = {
21 iface = "enp0s8";
22 ipv4 = ipv4;
23 #ipv6 = "fe80::1";
24 };
25 };
26 };
27 }