yevaud, orm, kalessin: split networking to separate file

This commit is contained in:
Katherina Walshe-Grey 2024-11-05 19:05:27 +00:00
parent 9cfe6e2c4c
commit 052b0c1c4f
9 changed files with 48 additions and 55 deletions

View file

@ -3,27 +3,16 @@
{
imports = [
./hardware-configuration.nix
./networking.nix
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking.hostName = "yevaud";
networking.hostId = "09673d65";
users.users.qenya.extraGroups = [ "wheel" ];
qenya.base-server.enable = true;
age.secrets.wireguard-peer-yevaud = {
file = ../../secrets/wireguard-peer-yevaud.age;
owner = "root";
group = "systemd-network";
mode = "640";
};
birdsong.peering = {
enable = true;
privateKeyFile = config.age.secrets.wireguard-peer-yevaud.path;
};
services.bind = {
# enable = true;
cacheNetworks = [ "10.127.0.0/16" "fd70:81ca:0f8f::/48" ];

View file

@ -37,14 +37,4 @@
swapDevices =
[ { device = "/dev/disk/by-uuid/f8b6eb35-33ad-4e19-bf3d-cac5ec38a8dc"; }
];
# 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.useNetworkd = true;
networking.interfaces.ens3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
{
networking.useNetworkd = true;
networking.interfaces.ens3.useDHCP = true;
age.secrets.wireguard-peer-yevaud = {
file = ../../secrets/wireguard-peer-yevaud.age;
owner = "root";
group = "systemd-network";
mode = "640";
};
birdsong.peering = {
enable = true;
privateKeyFile = config.age.secrets.wireguard-peer-yevaud.path;
};
}