resolved: Remove module as it's enabled by default when using networkd

This commit is contained in:
SebastianStork 2025-09-23 22:52:59 +02:00
parent 121d7364f7
commit 9ea6397786
7 changed files with 15 additions and 29 deletions

View file

@ -21,7 +21,7 @@ in
validate = lib.mkEnableOption "";
};
config = lib.mkIf cfg.validate {
config = {
assertions =
let
findDuplicatePorts =
@ -49,10 +49,9 @@ in
|> lib.concatStrings;
duplicateTcpPorts = findDuplicatePorts "tcp";
duplicateUdpPorts = findDuplicatePorts "udp";
in
[
lib.mkIf cfg.validate [
{
assertion = duplicateTcpPorts == { };
message = mkErrorMessage duplicateTcpPorts;
@ -62,5 +61,18 @@ in
message = mkErrorMessage duplicateUdpPorts;
}
];
meta.ports =
let
resolvedPorts = lib.mkIf config.services.resolved.enable [
53
5353
5355
];
in
{
tcp.list = resolvedPorts;
udp.list = resolvedPorts;
};
};
}

View file

@ -1,21 +0,0 @@
{ config, lib, ... }:
{
options.custom.services.resolved.enable = lib.mkEnableOption "";
config = lib.mkIf config.custom.services.resolved.enable {
meta.ports =
let
ports = [
53
5353
5355
];
in
{
tcp.list = ports;
udp.list = ports;
};
services.resolved.enable = true;
};
}