mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
resolved: Init module
This commit is contained in:
parent
de18f587c7
commit
2ffefb5f30
2 changed files with 26 additions and 13 deletions
|
|
@ -61,18 +61,5 @@ in
|
|||
message = mkErrorMessage duplicateUdpPorts;
|
||||
}
|
||||
];
|
||||
|
||||
meta.ports =
|
||||
let
|
||||
resolvedPorts = lib.mkIf config.services.resolved.enable [
|
||||
53
|
||||
5353
|
||||
5355
|
||||
];
|
||||
in
|
||||
{
|
||||
tcp.list = resolvedPorts;
|
||||
udp.list = resolvedPorts;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
26
modules/system/services/resolved.nix
Normal file
26
modules/system/services/resolved.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
ports = [
|
||||
53
|
||||
5353
|
||||
5355
|
||||
];
|
||||
in
|
||||
{
|
||||
options.custom.services.resolved.enable = lib.mkEnableOption "" // {
|
||||
default = config.systemd.network.enable;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.services.resolved.enable {
|
||||
meta.ports = {
|
||||
tcp.list = ports;
|
||||
udp.list = ports;
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
dnssec = "allow-downgrade";
|
||||
dnsovertls = "opportunistic";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue