toaster: basic config, nixpkgs-fmt
This commit is contained in:
parent
d3015fdbda
commit
f690251f13
10 changed files with 259 additions and 24 deletions
62
hosts/toaster/network.nix
Normal file
62
hosts/toaster/network.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ config, pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ iwgtk ];
|
||||
|
||||
networking = {
|
||||
hostName = "toaster";
|
||||
firewall.enable = true;
|
||||
networkmanager.enable = false;
|
||||
useNetworkd = true;
|
||||
wireguard.enable = true;
|
||||
wireless.iwd.enable = true;
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "allow-downgrade";
|
||||
};
|
||||
|
||||
# workaround for networkd waiting for shit
|
||||
systemd.services.systemd-networkd-wait-online.serviceConfig.ExecStart = [
|
||||
"" # clear old command
|
||||
"${config.systemd.package}/lib/systemd/systemd-networkd-wait-online --any"
|
||||
];
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
|
||||
# wait-online.ignoredInterfaces = [ "wlan0" "enp53s0" ];
|
||||
|
||||
# Interfaces on the machine
|
||||
netdevs."10-james" = {
|
||||
netdevConfig = {
|
||||
Name = "james";
|
||||
Kind = "bond";
|
||||
};
|
||||
bondConfig = {
|
||||
Mode = "active-backup";
|
||||
PrimaryReselectPolicy = "always";
|
||||
MIIMonitorSec = "1s";
|
||||
};
|
||||
};
|
||||
networks."10-ether-bond" = {
|
||||
matchConfig.MACAddress = "e8:80:88:2f:c6:70";
|
||||
networkConfig = {
|
||||
Bond = "james";
|
||||
PrimarySlave = true;
|
||||
};
|
||||
};
|
||||
networks."10-wlan-bond" = {
|
||||
matchConfig.MACAddress = "04:7b:cb:2a:aa:8c";
|
||||
networkConfig = {
|
||||
Bond = "james";
|
||||
};
|
||||
};
|
||||
networks."10-james-bond" = {
|
||||
matchConfig.Name = "james";
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue