profiles/common-networking: Centralize new network config
This commit is contained in:
parent
fed25f02d8
commit
de3bc903ef
profiles
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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
{
|
||||
|
||||
imports = [
|
||||
./common-networking
|
||||
./cybercluster-vm
|
||||
./fem-net
|
||||
./hetzner-cloud
|
||||
|
Loading…
x
Reference in New Issue
Block a user