anchor.diff:          '';
         };
   
  +      extraZncConf = mkOption {
  +        default = "";
  +        type = types.lines;
  +        description = ''
  +          Extra config to `znc.conf` file
  +        '';
  +      };
       };
     };
   
  
positive.code: 
    config = mkIf cfg.enable {
  
      systemd.services."znc-${cfg.user}" = {
        description = "ZNC Server of ${cfg.user}.";
        wantedBy = [ "multi-user.target" ];
        after = [ "network.service" ];
        path = [ pkgs.znc ];
        serviceConfig = {
          User = "${cfg.user}";
          Restart = "always";
          ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
          ExecStop   = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
        };
        preStart = ''
          ${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}
          ${pkgs.coreutils}/bin/chown ${cfg.user} ${cfg.dataDir} -R
          ${pkgs.coreutils}/bin/mkdir -p ${cfg.dataDir}/configs
  
          # If mutable, regenerate conf file every time.
          ${optionalString (!cfg.mutable) ''
            ${pkgs.coreutils}/echo "znc-${cfg.user} is set to be system-managed. Now deleting old znc.conf file to be regenerated."
            ${pkgs.coreutils}/rm -f ${cfg.dataDir}/configs/znc.conf
          ''}
  
  
negative.code:         description = "ZNC server daemon owner";
          group = defaultUser;
          uid = config.ids.uids.znc;
          home = cfg.dataDir;
          createHome = true;
          createUser = true;
        };
  