mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 13:46:59 +01:00
Use systemd-networkd instead of dhcpcd
This commit is contained in:
parent
ff0abf6309
commit
14bc8df55f
1 changed files with 22 additions and 3 deletions
|
|
@ -1,13 +1,32 @@
|
||||||
{ modulesPath, config, pkgs, ... }:
|
{ modulesPath, config, pkgs, ... }: {
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
fileSystems."/" = {
|
||||||
|
device = "/dev/sda1";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
boot.cleanTmpDir = true;
|
boot.cleanTmpDir = true;
|
||||||
networking.firewall.allowPing = true;
|
networking.firewall.allowPing = true;
|
||||||
networking.usePredictableInterfaceNames = false;
|
networking.usePredictableInterfaceNames = false;
|
||||||
|
|
||||||
|
networking.dhcpcd.enable = false;
|
||||||
|
|
||||||
|
systemd.network = {
|
||||||
|
enable = true;
|
||||||
|
networks."10-wan" = {
|
||||||
|
matchConfig.Name = "eth0";
|
||||||
|
networkConfig.DHCP = "ipv4";
|
||||||
|
# make routing on this interface a dependency for network-online.target
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
networks."20-lan" = {
|
||||||
|
matchConfig.Name = "eth1";
|
||||||
|
networkConfig.DHCP = "ipv4";
|
||||||
|
linkConfig.RequiredForOnline = "routable";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue