nixosModules/clanCore: support nix-darwin
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
_class,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.clan.core = {
|
||||
networking = {
|
||||
@@ -96,23 +101,25 @@
|
||||
]
|
||||
)
|
||||
];
|
||||
config = lib.mkIf config.clan.core.enableRecommendedDefaults {
|
||||
# conflicts with systemd-resolved
|
||||
networking.useHostResolvConf = false;
|
||||
config = lib.optionalAttrs (_class == "nixos") (
|
||||
lib.mkIf config.clan.core.enableRecommendedDefaults {
|
||||
# conflicts with systemd-resolved
|
||||
networking.useHostResolvConf = false;
|
||||
|
||||
# Allow PMTU / DHCP
|
||||
networking.firewall.allowPing = true;
|
||||
# Allow PMTU / DHCP
|
||||
networking.firewall.allowPing = true;
|
||||
|
||||
# The notion of "online" is a broken concept
|
||||
# https://github.com/systemd/systemd/blob/e1b45a756f71deac8c1aa9a008bd0dab47f64777/NEWS#L13
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
systemd.network.wait-online.enable = false;
|
||||
# The notion of "online" is a broken concept
|
||||
# https://github.com/systemd/systemd/blob/e1b45a756f71deac8c1aa9a008bd0dab47f64777/NEWS#L13
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
systemd.network.wait-online.enable = false;
|
||||
|
||||
systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault true;
|
||||
systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault true;
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ]; # Multicast DNS
|
||||
systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault true;
|
||||
systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault true;
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ]; # Multicast DNS
|
||||
|
||||
# Use networkd instead of the pile of shell scripts
|
||||
networking.useNetworkd = lib.mkDefault true;
|
||||
};
|
||||
# Use networkd instead of the pile of shell scripts
|
||||
networking.useNetworkd = lib.mkDefault true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user