Initial commit
This commit is contained in:
22
modules/n/networking.nix
Normal file
22
modules/n/networking.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ 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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user