Jafner.net/dotfiles/modules/networking.nix
Joey Hafner fff1d2c480
Enhancement (WIP): Consolidate system configurations into modules.
- system: Module describes core Linux system configuration parameters, and NixOS system parameters.
  - networking: Basic networking config for metal hosts.
  - sops: Configures sops-nix to decrypt secrets as appropriate, and provides a useful shell helper.
  - smb: Reusable module that returns one smb mount.
  - iscsi: Autoconnect and auto-mount iscsi target.
  - git: Basic Git config.
  - docker: Configure Docker.
  - hardware: Set of modules for physical hardware devices and their related configurations.
2025-02-16 00:13:27 -08:00

12 lines
386 B
Nix

{ networking, ... }: {
networking = {
hostName = networking.hostname;
defaultGateway = { address = networking.ip; interface = networking.interface; };
interfaces."${networking.interface}" = {
useDHCP = true;
macAddress = networking.mac;
ipv4.addresses = [ { address = networking.ip; prefixLength = 24; } ];
};
nameservers = networking.dns;
};
}