This repository has no description
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132{ lib, config, ... }:let cfg = config.z34.static-addr;in{ options.z34.static-addr = { enable = lib.mkOption { type = lib.types.bool; default = false; }; hostname = lib.mkOption { type = lib.types.str; }; nic = lib.mkOption { type = lib.types.str; }; ipAddr = lib.mkOption { type = lib.types.str; }; };
config = lib.mkIf cfg.enable { networking = { useDHCP = false; enableIPv6 = false; hostName = cfg.hostname; interfaces.${cfg.nic}.ipv4.addresses = [ { address = cfg.ipAddr; prefixLength = 24; } ]; defaultGateway = "192.168.1.1"; nameservers = [ "192.168.1.1" ]; }; };}