anchor.diff:  
     homeDir = "/var/lib/nylon";
   
  -  configFile = pkgs.writeText "nylon.conf" ''
  +  configFile = cfg: pkgs.writeText "nylon-${cfg.name}.conf" ''
       [General]
       No-Simultaneous-Conn=${toString cfg.nrConnections}
       Log=${if cfg.logging then "1" else "0"}
  
positive.code:     Deny-IP=${concatStringsSep " " cfg.deniedIPRanges}
    '';
  
  in
  
  {
  
    ###### interface
  
    options = {
  
      services.nylon = {
  
        enable = mkOption {
          type = types.bool;
  
negative.code:         '';
        };
      };
      config = { name = mkDefault name; };
    };
  
    mkNamedNylon = cfg: {
      "nylon-${cfg.name}" = {
        description = "Nylon, a lightweight SOCKS proxy server";
        after = [ "network.target" ];
        wantedBy = [ "multi-user.target" ];
        serviceConfig =
        {
          User = "nylon";
          Group = "nylon";
          WorkingDirectory = homeDir;
          ExecStart = "${pkgs.nylon}/bin/nylon -f -c ${configFile cfg}";
        };
      };
    };
  
    anyNylons = collect (p: p ? enable) cfg;
    enabledNylons = filter (p: p.enable == true) anyNylons;
    nylonUnits = map (nylon: mkNamedNylon nylon) enabledNylons;
  
  in
  
  {
  
    ###### interface
  
    options = {
  
      services.nylon = mkOption {
        default = {};
        description = "Collection of named nylon instances";
        type = with types; loaOf (submodule nylonOpts);
        internal = true;
        options = [ nylonOpts ];
      };
  
    };
  
    ###### implementation
  
    config = mkIf (length(enabledNylons) > 0) {
  
      users.extraUsers.nylon = {
        group = "nylon";
        description = "Nylon SOCKS Proxy";
        home = homeDir;
  