From 02abf4ed0131237c25e0a10db50fa4c41a902a50 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 14 Jul 2024 17:53:13 -0600 Subject: sys: final merge of dmz, hv into sys --- sys/net.nix | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 sys/net.nix (limited to 'sys/net.nix') diff --git a/sys/net.nix b/sys/net.nix deleted file mode 100644 index b441350..0000000 --- a/sys/net.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib, config, pkgs, ... }: -with lib; let - cfg = config.local; -in -{ - options.local = with lib.types; { - hostname = mkOption { - type = str; - }; - - dhcpInterface = mkOption { - type = nullOr str; - default = null; - }; - }; - - config = { - environment.systemPackages = [ pkgs.dhcpcd ]; - - networking = { - hostName = cfg.hostname; - - useDHCP = false; - useNetworkd = true; - - wireguard.enable = true; - }; - - systemd.network.networks."40-${cfg.dhcpInterface}" = mkIf (cfg.dhcpInterface != null) { - matchConfig.Name = cfg.dhcpInterface; - - networkConfig = { - DHCP = "ipv4"; - IPv6AcceptRA = true; - IPv6PrivacyExtensions = "kernel"; - }; - - # make routing on this interface a dependency for network-online.target - linkConfig.RequiredForOnline = "routable"; - }; - }; -} -- cgit v1.2.3