anchor.diff:      v == "Open" ||
       v == "Closed" ||
       v == "Registered";
  +
  +  bitlbeeConfig = pkgs.writeText "bitlbee.conf"
  +    ''
  +    [settings]
  +    RunMode = Daemon
  +    User = bitlbee  
  +    ConfigDir = /var/lib/bitlbee      
  +    DaemonInterface = ${cfg.interface}
  +    DaemonPort = ${toString cfg.portNumber}
  +    AuthMode = ${cfg.authMode}
  +    ${cfg.extraSettings}
  +
  +    [defaults]
  +    ${cfg.extraDefaults}
  +    '';
   
   in
   
  
positive.code:         uid = bitlbeeUid;
          description = "BitlBee user";
          home = "/var/lib/bitlbee";
        };
  
      users.extraGroups = singleton
  
negative.code:       { description = "BitlBee IRC to other chat networks gateway";
          after = [ "network.target" ];
          wantedBy = [ "multi-user.target" ];
          serviceConfig.User = "bitlbee";
          serviceConfig.ExecStart = "${pkgs.bitlbee}/sbin/bitlbee -F -n -c ${bitlbeeConfig}";
        };
  
      environment.systemPackages = [ pkgs.bitlbee ];
  
    };
  
  }
  