fix: more fixes to networking, but dhcp6 not working yet
This commit is contained in:
parent
fda3130e30
commit
c6563b3cf4
|
@ -2,9 +2,12 @@
|
||||||
flake,
|
flake,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/wg-private-biolimo.age";
|
age.secrets.wg-private-key.file = "${flake.self}/secrets/wg-private-biolimo.age";
|
||||||
|
|
||||||
pub-solar.wireguard-client = {
|
pub-solar.wireguard-client = {
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
age.secrets.wg-private-key.file = "${flake.self}/secrets/wg-private-chocolatebar.age";
|
age.secrets.wg-private-key.file = "${flake.self}/secrets/wg-private-chocolatebar.age";
|
||||||
|
|
||||||
pub-solar.wireguard-client = {
|
pub-solar.wireguard-client = {
|
||||||
|
|
|
@ -34,14 +34,6 @@
|
||||||
|
|
||||||
swapDevices = [{device = "/dev/disk/by-uuid/0203b641-280f-4a3d-971d-fd32a666c852";}];
|
swapDevices = [{device = "/dev/disk/by-uuid/0203b641-280f-4a3d-971d-fd32a666c852";}];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
networking.interfaces.enp2s0f1.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
}: {
|
}: {
|
||||||
networking.hostName = "droppie";
|
networking.hostName = "droppie";
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault false;
|
||||||
|
networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault false;
|
||||||
|
networking.interfaces.enp2s0f1.useDHCP = lib.mkDefault false;
|
||||||
|
|
||||||
networking.interfaces.enp2s0f0 = {
|
networking.interfaces.enp2s0f0 = {
|
||||||
ipv4.addresses = [ { address = "192.168.178.3"; prefixLength = 32; } ];
|
ipv4.addresses = [ { address = "192.168.178.3"; prefixLength = 32; } ];
|
||||||
ipv6.addresses = [ { address = "2a02:908:5b1:e3c0:3::"; prefixLength = 128; } ];
|
ipv6.addresses = [ { address = "2a02:908:5b1:e3c0:3::"; prefixLength = 128; } ];
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
dhcp-socket-type = "raw";
|
dhcp-socket-type = "raw";
|
||||||
interfaces = [
|
interfaces = [
|
||||||
"enabcm6e4ei0"
|
"enabcm6e4ei0"
|
||||||
"wlan0"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,11 +46,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
reservations = [
|
reservations = [
|
||||||
{
|
# Pie should set ip itself
|
||||||
hostname = "pie.local";
|
|
||||||
hw-address = "dc:a6:32:5c:31:64";
|
|
||||||
ip-address = "192.168.178.2";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
hostname = "droppie.local";
|
hostname = "droppie.local";
|
||||||
hw-address = "08:f1:ea:97:0f:0c";
|
hw-address = "08:f1:ea:97:0f:0c";
|
||||||
|
@ -62,6 +57,16 @@
|
||||||
hw-address = "b8:76:3f:64:a3:64";
|
hw-address = "b8:76:3f:64:a3:64";
|
||||||
ip-address = "192.168.178.4";
|
ip-address = "192.168.178.4";
|
||||||
}
|
}
|
||||||
|
# {
|
||||||
|
# hostname = "chocolatebar.local";
|
||||||
|
# hw-address = "48:a4:72:1d:29:32";
|
||||||
|
# ip-address = "192.168.178.5";
|
||||||
|
# }
|
||||||
|
{
|
||||||
|
hostname = "biolimo.local";
|
||||||
|
hw-address = "48:a4:72:1d:29:32";
|
||||||
|
ip-address = "192.168.178.6";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -74,15 +79,19 @@
|
||||||
interfaces-config = {
|
interfaces-config = {
|
||||||
interfaces = [
|
interfaces = [
|
||||||
"enabcm6e4ei0"
|
"enabcm6e4ei0"
|
||||||
"wlan0"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
lease-database = {
|
lease-database = {
|
||||||
name = "/var/lib/kea/dhcp6.leases";
|
name = "/var/lib/kea/dhcp6.leases";
|
||||||
persist = true;
|
persist = true;
|
||||||
type = "memfile";
|
type = "memfile";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
rebind-timer = 2000;
|
||||||
|
renew-timer = 1000;
|
||||||
|
valid-lifetime = 4000;
|
||||||
|
|
||||||
subnet6 = [
|
subnet6 = [
|
||||||
{
|
{
|
||||||
subnet = "2a02:908:5b1:e3c0::/64";
|
subnet = "2a02:908:5b1:e3c0::/64";
|
||||||
|
@ -109,19 +118,23 @@
|
||||||
"2a02:908:5b1:e3c0:3::"
|
"2a02:908:5b1:e3c0:3::"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
# {
|
||||||
|
# hostname = "chocolatebar.local";
|
||||||
|
# hw-address = "08:f1:ea:97:0f:0c";
|
||||||
|
# ip-addresses = [
|
||||||
|
# "2a02:908:5b1:e3c0:5::"
|
||||||
|
# ];
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
hostname = "pie.local";
|
hostname = "biolimo.local";
|
||||||
hw-address = "dc:a6:32:5c:31:64";
|
hw-address = "48:a4:72:1d:29:32";
|
||||||
ip-addresses = [
|
ip-addresses = [
|
||||||
"2a02:908:5b1:e3c0:2::"
|
"2a02:908:5b1:e3c0:6::"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
rebind-timer = 2000;
|
|
||||||
renew-timer = 1000;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,14 +36,6 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.end0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
networking.useDHCP = lib.mkDefault false;
|
||||||
|
|
||||||
networking.hostId = "34234773";
|
networking.hostId = "34234773";
|
||||||
networking.hostName = "pie";
|
networking.hostName = "pie";
|
||||||
networking.defaultGateway = {
|
networking.defaultGateway = {
|
||||||
|
@ -13,8 +15,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.interfaces.enabcm6e4ei0 = {
|
networking.interfaces.enabcm6e4ei0 = {
|
||||||
ipv4.addresses = [ { address = "192.168.178.2"; prefixLength = 32; } ];
|
ipv4.addresses = [
|
||||||
ipv6.addresses = [ { address = "2a02:908:5b1:e3c0:2::"; prefixLength = 128; } ];
|
{ address = "192.168.178.2"; prefixLength = 32; }
|
||||||
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{ address = "2a02:908:5b1:e3c0:2::"; prefixLength = 128; }
|
||||||
|
{ address = "fe80::b12f:acab:1312:acab"; prefixLength = 128; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
|
Loading…
Reference in a new issue