1
0

profiles/common-networking: Centralize new network config

This commit is contained in:
clerie 2025-03-20 20:03:39 +01:00
parent fed25f02d8
commit de3bc903ef
2 changed files with 25 additions and 0 deletions
profiles
common-networking
default.nix

@ -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