Jump to content

NextDNS: Difference between revisions

From NixOS Wiki
Klinger (talk | contribs)
First version of page
 
Klinger (talk | contribs)
m typo
Line 1: Line 1:
[https://nextdns.io/ NextDNS] is a commercial DNS provider with a subscription model. The DNS resolution is highly configurable
[https://nextdns.io/ NextDNS] is a commercial DNS provider with a subscription model. The DNS resolution is highly configurable


= Installation and configuration =
= Installation and configuration =
Line 22: Line 21:
</syntaxhighlight>
</syntaxhighlight>


== activation by configuration ==
== Activation by configuration ==
<syntaxhighlight lang="nixos">
<syntaxhighlight lang="nixos">
systemd.services.nextdns-activate = {
systemd.services.nextdns-activate = {

Revision as of 16:13, 20 March 2025

NextDNS is a commercial DNS provider with a subscription model. The DNS resolution is highly configurable

Installation and configuration

It is necessary to install the nextdns package in addition to enabling the service. Otherwise it is not possible to (de-)activate it.

To install NextDNS its necessary to enable the service and supply the link to the subdomain of the configuration (abcdef will use abcdef.dns.nextdns.io). The cache-size is optional. Default for cache-size is not using a cache at all.

services.nextdns = {

 enable = true;
 arguments = [ "-config" "abcdef" "-cache-size" "10MB" ];

};

Activation

NextDNS needs to be activated after a NixOS rebuild. It can be activated manually or by configuration.

Manual activation

sudo nextdns activate

Activation by configuration

systemd.services.nextdns-activate = {
    script = ''
      /run/current-system/sw/bin/nextdns activate
    '';
    after = [ "nextdns.service" ];
    wantedBy = [ "multi-user.target" ];
  };