<commit_before># Module for rdnssd, a daemon that configures DNS servers in
# /etc/resolv/conf from IPv6 RDNSS advertisements.

{ config, pkgs, ... }:

with pkgs.lib;

{

  ###### interface

  options = {
  
    services.rdnssd.enable = mkOption {
      default = config.networking.enableIPv6;
      description =
        ''
          Whether to enable the RDNSS daemon
          (<command>rdnssd</command>), which configures DNS servers in
          <filename>/etc/resolv.conf</filename> from RDNSS
          advertisements sent by IPv6 routers.
        '';
    };

  };


  ###### implementation

  config = mkIf config.services.rdnssd.enable {

    jobs.rdnssd =
      { description = "RDNSS daemon";
      
        # Start before the network interfaces are brought up so that
        # the daemon receives RDNSS advertisements from the kernel.
        startOn = "starting network-interfaces";

        # !!! Should write to /var/run/rdnssd/resolv.conf and run the daemon under another uid.
        exec = "${pkgs.ndisc6}/sbin/rdnssd --resolv-file /etc/resolv.conf -u root";

        daemonType = "fork";
      };

  };<commit_msg>* Don't enable rdnssd by default for the moment.<commit_after># Module for rdnssd, a daemon that configures DNS servers in
# /etc/resolv/conf from IPv6 RDNSS advertisements.

{ config, pkgs, ... }:

with pkgs.lib;

{

  ###### interface

  options = {
  
    services.rdnssd.enable = mkOption {
      default = false;
      #default = config.networking.enableIPv6;
      description =
        ''
          Whether to enable the RDNSS daemon
          (<command>rdnssd</command>), which configures DNS servers in
          <filename>/etc/resolv.conf</filename> from RDNSS
          advertisements sent by IPv6 routers.
        '';
    };

  };


  ###### implementation

  config = mkIf config.services.rdnssd.enable {

    jobs.rdnssd =
      { description = "RDNSS daemon";
      
        # Start before the network interfaces are brought up so that
        # the daemon receives RDNSS advertisements from the kernel.
        startOn = "starting network-interfaces";

        # !!! Should write to /var/run/rdnssd/resolv.conf and run the daemon under another uid.
        exec = "${pkgs.ndisc6}/sbin/rdnssd --resolv-file /etc/resolv.conf -u root";

        daemonType = "fork";
      };

  };
{'fraction_non_alphanumeric': 0.11001289213579717, 'fraction_numerical': 0.0034379028792436614, 'mean_word_length': 2.3304721030042916, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6631353', 'n_tokens_mistral': 751, 'n_tokens_neox': 719, 'n_words': 200}