23 lines
607 B
Nix
23 lines
607 B
Nix
{ 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;
|
|
};
|
|
}
|