Files
nixos-config/modules/n/networking.nix

23 lines
607 B
Nix
Raw Normal View History

2025-08-20 18:24:02 +03:00
{ host, lib, config, ... }:
with lib;
let cfg = config.n.host;
in {
options.n.host = {
hostId = mkOption { type = types.str; };
domain = mkOption { type = types.str; default = "${host}.local"; };
};
config = {
networking = {
hostName = host;
hostId = cfg.hostId;
domain = cfg.domain;
dhcpcd.enable = true;
useDHCP = lib.mkDefault true;
};
systemd.network.wait-online.enable = lib.mkForce false;
boot.initrd.systemd.network.wait-online.enable = lib.mkForce false;
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
};
}