l neoprism.r: add networking

This commit is contained in:
lassulus 2023-07-08 17:04:00 +02:00
parent b62c593802
commit a2fae747ec

View File

@ -17,26 +17,58 @@
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# networking config # networking config
boot.kernelParams = [ "net.ifnames=0" ]; networking.useNetworkd = true;
networking.bridges."ext-br".interfaces = [ "eth0" ]; systemd.network = {
networking = { enable = true;
hostId = "2283aaae"; config = {
defaultGateway = "95.217.192.1"; networkConfig.SpeedMeter = true;
defaultGateway6 = { address = "fe80::1"; interface = "ext-br"; }; };
# Use google's public DNS server # netdevs.ext-br.netdevConfig = {
nameservers = [ "8.8.8.8" ]; # Kind = "bridge";
interfaces.ext-br.ipv4.addresses = [ # Name = "ext-br";
{ # MACAddress = "a8:a1:59:0f:2d:69";
address = "95.217.192.59"; # };
prefixLength = 26; # networks.ext-br = {
} # name = "ext-br";
]; # address = [
interfaces.ext-br.ipv6.addresses = [ # "95.217.192.59/26"
{ # "2a01:4f9:4a:4f1a::1/64"
address = "2a01:4f9:4a:4f1a::1"; # ];
prefixLength = 64; # gateway = [
} # "95.217.192.1"
]; # "fe80::1"
# ];
# };
networks.eth0 = {
#bridge = [ "ext-br" ];
matchConfig.Name = "eth0";
address = [
"95.217.192.59/26"
"2a01:4f9:4a:4f1a::1/64"
];
gateway = [
"95.217.192.1"
"fe80::1"
];
};
}; };
networking.useDHCP = false;
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
authorizedKeys = [ config.krebs.users.lass.pubkey ];
port = 2222;
hostKeys = [
(toString <secrets/ssh.id_ed25519>)
(toString <secrets/ssh.id_rsa>)
];
};
};
boot.kernelParams = [
"net.ifnames=0"
"ip=dhcp"
"boot.trace"
];
} }