Files
.github
.vscode
docs
hydra
keys
lib
modules
systems
artemision
jeeves
jeeves-jr
palatine-hill
keys
configuration.nix
default.nix
hardware.nix
networking.nix
secrets.yaml
rhapsody-in-green
users
.envrc
.gitconfig
.gitignore
.sops.yaml
checks.nix
flake.lock
flake.nix
shell.nix
sops-mergetool.sh
statix.toml
treefmt.toml
nix-dotfiles/systems/palatine-hill/networking.nix
2024-05-27 17:00:29 +00:00

35 lines
699 B
Nix

{
config,
lib,
pkgs,
...
}:
{
networking = {
hostId = "dc2f9781";
firewall.enable = false;
};
systemd.network = {
enable = true;
networks = {
# enable DHCP for primary ethernet adapter
"10-lan" = {
matchConfig.Name = "eno1";
address = [ "192.168.76.2/32" ];
routes = [ { routeConfig.Gateway = "192.168.76.1"; } ];
linkConfig.RequiredForOnline = "routable";
};
# default lan settings
"60-def-lan" = {
matchConfig.Name = "eno*";
networkConfig.DHCP = "ipv4";
routes = [ { routeConfig.Gateway = "192.168.76.1"; } ];
linkConfig.RequiredForOnline = "no";
};
};
};
}