feat: add hyp-01
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
95cbbfb157
commit
a55ed8b41b
8 changed files with 306 additions and 1 deletions
51
hosts/hyp-01/modules/networking.nix
Normal file
51
hosts/hyp-01/modules/networking.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options = {
|
||||
networking.hyp-01.ipv4.address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "88.99.145.10";
|
||||
};
|
||||
|
||||
networking.hyp-01.ipv4.cidr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "26";
|
||||
};
|
||||
|
||||
networking.hyp-01.ipv4.gateway = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "88.99.145.1";
|
||||
};
|
||||
|
||||
networking.hyp-01.ipv6.address = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "2a01:4f8:10a:2962::1";
|
||||
};
|
||||
|
||||
networking.hyp-01.ipv6.cidr = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "64";
|
||||
};
|
||||
|
||||
networking.hyp-01.ipv6.gateway = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "fe80::1";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking = {
|
||||
dhcpcd.enable = false;
|
||||
nameservers = [ "9.9.9.9" ];
|
||||
};
|
||||
|
||||
systemd.network.networks."10-uplink".networkConfig.Address = config.networking.hyp-01.ipv6.address;
|
||||
|
||||
boot.initrd.systemd.network.networks."10-uplink" = config.systemd.networks."10-uplink";
|
||||
|
||||
boot.initrd.network = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = [ "igb" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue