profiles/common-networking: Centralize new network config
This commit is contained in:
24
profiles/common-networking/default.nix
Normal file
24
profiles/common-networking/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
options.profiles.clerie.common-networking = {
|
||||
enable = mkEnableOption "Common networking config";
|
||||
};
|
||||
|
||||
config = mkIf config.profiles.clerie.common-networking.enable {
|
||||
|
||||
# Disable scripted network
|
||||
networking.useDHCP = false;
|
||||
# Enable systemd-networkd
|
||||
systemd.network.enable = true;
|
||||
|
||||
# Don't wait for online, if NetworkManger is running too
|
||||
systemd.network.wait-online = mkIf (config.networking.networkmanager.enable == true) {
|
||||
enable = false;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user