summaryrefslogtreecommitdiff
path: root/sys/net.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-07-14 17:53:13 -0600
committerAlejandro Soto <alejandro@34project.org>2024-07-15 09:34:00 -0600
commit02abf4ed0131237c25e0a10db50fa4c41a902a50 (patch)
tree20904894fc0952806e341cdaff5941e81b3ce51c /sys/net.nix
parent08e746700341dda3e3bdf704332fc3c07053d3e7 (diff)
sys: final merge of dmz, hv into sys
Diffstat (limited to 'sys/net.nix')
-rw-r--r--sys/net.nix42
1 files changed, 0 insertions, 42 deletions
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";
- };
- };
-}