Skip to content

Commit

Permalink
thatcher: switch to use systemd-networkd
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed Apr 29, 2024
1 parent 570efe7 commit 63d5e2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions machines/thatcher/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ in with lib; {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
inputs.self.nixosModules.server

./net.nix
];

services.qemuGuest.enable = true;
Expand Down
23 changes: 23 additions & 0 deletions machines/thatcher/net.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ pkgs, lib, ... }:
with lib; {
networking.useDHCP = false;

systemd.network = {
enable = true;

networks."10-base-ens" = {
name = "ens*";
matchConfig.Type = "ether";
networkConfig = {
Description = "Primary network connection";
DHCP = "yes";
IPv6AcceptRA = true;
};
address = [
"100.64.0.45/31"
"2a11:f2c0:3:16::1/64"
];
routes = [{ routeConfig.Gateway = "100.64.0.44"; }];
};
};
}

0 comments on commit 63d5e2d

Please sign in to comment.